Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "microcontroller"
-
StackOverflow: let's marginalize your "problem" and focus on the real issue at hand, which is that line 4 doesn't conform to the language standards and thus will lead to undefined behavior on a single kind of 8-bit microcontroller made in 1984 that is no longer in use.5
-
!rant
I once designed my own Arduino IDE compatible microcontroller, and even had the card manufactured.
Sadly I've yet to actually use it for anything, but hey, achievement unlocked, right?15 -
In my college days i was designing a bootloader for avr microcontroller , i had the idea to flash code wirelessly to avr over bluetooth and also cross compile the compiler for android device so that you can code on android, every thing went well just one thing didn't, i saw that code of certain size is executing properly , greater than that size gives me wired outputs so i have to dump hex from the avr (that is flashed the by bootloader) and compaire it with the original hex of code it got messy as you can see, most fun part of this bug is that error can be anywhere cross compiler may be fucked up , the bootloader may be fucked up , or it may be my bluetooth module , after 14 hours of staring at the hex code i figured out the mess in bootloader instruction that was changing the page address for flashing .
when it worked it was 3am in night i literally burst into tears of joy next day bought myself a cake to celebrate6 -
Although I love developing I always thought that there was something missing.
I learned Java but didn't really like it. I had spent quite some time with web development and enjoyed it but I felt like developing with JavaScript was too high level and I felt the same for Python.
So I started learning the most awesome programming language: C
I just love that I have so much control over everything and that the language is so compact and gives you just the right amount of tools you need.
I also love physics and electronics a lot and it feels awesome to first build something and then program it.
I am looking forward to design a PCB (printed circuit board) and write code for an AVR microcontroller like the Atmega328 (most arduinos use this one).
Picture of the project I am working on.10 -
On my annoying radar today - devs who learn one language and then *insist* on using it for everything, even when it makes absolutely zero sense.
"Ooh I'd like to do some microcontroller development. But I only know Java. How do you run Java on a microcontroller?"
"...You don't."
"...but I heard a talk where someone did it. Look, there's this microjava page. How do I use it?"
"It's an interesting technical demo, but that's it. Dude, just learn C. It's not hard, Java has C style syntax anyway and this way you can...."
"...but I only want to use modern programming languages. C is irrelevant these days, it's pointless me learning it."
"It's definitely still relevant if you want to program a microcontroller."
"...but I want to do that in Java."
🤦♂️15 -
I made a program that dispenses coins in 345 lines. It tells you if the coin tray is in place, and if it didn't dispense enough coins it will tell you how many successfully dispensed. It also has ACK\NAK communication. It's written in C for a specialized microcontroller.
I have written code that talks to 4 devices, but this is the only one I have written the code for. In 2 years it has never had a bug, and always responds quickly and correctly via RS 232. -
My PCBs that I designed arrived today! They're just to test how to use the Atmega32u4 microcontroller before I make a keyboard using it :)10
-
You might remember this board from my last post...
After weeks and weeks of trying to get this microcontroller to work I finally managed, and of course the problem was that I was being stupid...
Anyway, it now fades an LED on and off! Very fun, now to make a keyboard...11 -
My devGoals for 2019 are:
- Move DNS blocking from hosts file to a PiHole (or similar) at home
- Implement a full HAL for some smol microcontroller in C
- Create better automation templates for testing, building & deployment for our Angular projects
- Get rid of crippling depression
- Force my boss away from firebase and google tools in general
- Spread the love for CraftCMS
- Spread more love in general (with protection of course) 😄1 -
//An okay long rant..
So i work at this small robotics start-up company I Copenhagen.
The first dumb part is that it only uses interns as staff, because then they don't need to pay people. (I am working part time, for free. Just to get experience (I am only 20 btw))
So.. I often get into an argument with my boss, since she is a designer with a "passion" for robotics (she has no clue how to do anything related to the work) But I often try to explain to her some current limitations in the staff, and what is possible for us to do, but she will never listen. She really wants us to design our own microcontroller board PCB, and she want it at the size of a coin. However when I tell her that none of the, non paid works has the experience or education to design such a thing, she never wants to acknowledge it, and it really pisses me off.
And her dad, who is the top boss, only care for esthetics when he is making a work environment, which is dumb when we just need to develop stuff...
Sorry if the rant was too long but had to get it out..8 -
Another project with legacy code got just dusted off at work. Shits fucked beyond recognition! We got:
- Rando variable names that mean nothing
- Timers running with a cycle time of 2.5ms if you start them with the multiplier 1.
- An Interrupt routine thats 300 lines long.
- Another interrupt thats starting an ADC conversion and waiting for it to complete before returning.
- For loops that start with one and subtract one from the iterator in the loop
- Every value that would normally be expressed as a regular number is written down in Hex. Eg: if(val==0x05)
- State machine built without writing down which state is which. Its just a number. (In hex obviously!)
- All running on a Microcontroller you cant debug on.
- Using a compiler no one has ever heard of before.
- Weird ass Port manipulations
- 15 different .hex and .elf files with no clue whats in them.
- No version control
- We tried explaining the code to a monkey and it hanged itself.10 -
A few days ago someone posted a pic of an ESP8266 microcontroller, so it reminded me that I have one of those lying around with a board with a screen I built during summer, so I thought, why not making a devrant reader, and so here it is:
For now it can only read rants, posting is coming soon, the software keyboard is already implemented
We call it the thing (Accrocchio in italian)5 -
After years of working with managed code, having to work with a microcontroller in C and that only has 1kb of SRAM is being a big fucking challenge.5
-
Dear coworker,
when I asked: "So, how does it work?", I didn't expect the answer to be: "Well, you push this button, wait three seconds and when it's finished, this LED turns on."
I was hoping for a more in-depth description (like, the way you'd consider me to be seriously interested in your work or learning from you) along the lines of "Well, you see, I have written this CLI-Tool here, which connects to the adapter and parses the contents of the file via serial interface to the on-board controller. This controller performs an integrity check of the device and then decides whether to flash or not. The testing unit itself checks if its being programmed with the right parameters."
Of course I know how a programming device works but I was interested in your solution in this special case ... so I think I'll just check the doc later if there'll ever be some.4 -
Raspberry Pi recently announced their first micro controller.
Will I buy two to four of them? Yes
Will I do anything with them the next 2 years? Probably not
https://raspberrypi.org/products/...20 -
I wanted to create a microcontroller website. It would feature simple circuits and microcontroller code to build things. The intent was to show absolute beginner concepts to people. Since I am older than the whipper snappers out there I thought I would have concept of some old man running the website.
I found cartoon artwork featuring an old man and I also got the domain oldmanmicro.com. I then created a bunch of pages featuring some really basic circuits. I setup an affiliate program with amazon to provide kits to people and embedded those into the website. This site was going to take a lot of creativity. I struggled with what to put on the site. This was going to take time. At this point I felt pretty good with my progress. It looked nice, the links were good, etc.
Then I did web search for oldmanmicro. I found my website in top hits. I also found something else... The 3rd or fourth hit down was some fucking old dude with a micro penis website. WTF! The worst possible combination of letters in my domain name produce this terrible experience. I was already struggling with content ideas, and this just demoralized my efforts. Thus ended the tale of the oldmanmicro.com. Perhaps the micro penis guy bought it, I don't know. I am afraid to look.
This was my very ignorant adventure with not researching a domain name thoroughly.6 -
Last completed (so not something which is still going on) project i have learned a lot was for "digital- and microcontroller technology" classes.
I designed a tower which fits on a pc fan. In this tower there is a tabletennis ball and on top of it is a infrared sensor. With a Potentiometer you can set the height at which the ball shall float.
As microcontroller i took an arduino uno. For visualization i used SerialComInstruments.
Learned lots of microcontroller programming, pid controls and how the fuck a serial port communication really works.3 -
I started with C#at the age of 12, it was way too complicated and I learned Lua for Computer craft instead. Next I learned Ruby for RPG Maker and finally Javascript for web Dev stuff.
Now comfortable enought with Javascript but put off by its quirks I learned Java for compiling faulty minecraft mods, but I only fully learned it in school.
At the same time I learned python and quite liked it for scripting, but ultimately it was not a good match for my projects.
Disapointed with Java I returned to C# and liked it quite a lot, but started learning C++. After touching my first Microcontroller I learned C and I've stuck with it as my favorite language.
Along the way I picked up Kotlin, in case I need to do some Java shit. Much better.
But how did I come to an understanding of programming. Well I got better after each time I got a layer deeper until I hit silicon.
I had tinkered with electronics since I was 15 so I just had to study some boolean mathematics in school and some vintage computers architecture and instruction sets and...
Then I finally understood how that shit I wrote in Lua way back when was actually executed by my hardware.
Allways dig deeper and you'll find enlightenment eventually. -
My first task in my current company, a few years ago.
I had to add features to a 10 year old microcontroller-based device written in C.
There was a struct named "global", which held hundreds of other structs that held variables or even more structs.
If one would have printed the structure of this mess it would haven needed several pages.
This "global"-struct was used in every single sourcefile to store and pass data around. Obviously there was no documentation and often useless comments.
Additionally there were a few protocol stacks involved, mainly similar, only differing in one or two protocol layers.
The implementation of the protocol stack was by setting flags in the "global"-struct in every protocol layer and having the application data in a buffer.
The complete telegram with all layer specific data (header, checksums, etc.) was then build at one single point right before sending it, based on the flags and the data buffer.
As there was no chance to reuse protocol layers with this implemenation. Three protocol implementations with special telegram builder existed in parallel, although they were nearly identical.
I needed a fourth variant of the protocol stack, so I had no chance but to make another copy with some minor changes.
But there was a benefit from this task.
As I had to do the software for the successor of this device from scratch I learned for many things how not to do them :-) -
I dislike the damage web development tools have done to my programming habits.
The rapid feedback provided from the development environment (e.g. hot-reloads) encourages me to constantly bang out code with very little consideration for its side-effects.
This tendency has become a handicap when I write instructions for hardware with much less resources, such as a microcontroller.3 -
it was my first job as an embedded engineer i was hired to write firmware for arm microcontroller that has ble radio. But the microcontroller we used didn't have FLASH it had a SRAM and an otp ( one time programmable) memory. In ble you can make a proximity beacon and When a phone passes by this beacon it will get a notification '<device_name> nearby'
. I thought it is funny if i keep device name 'MILF' (original name of device is FLIP ) so when somebody's phone is in proximity it will have a notification 'MILF nearby'. joke didn't work as nobody has their bluetooth switched on by default ,but i forgot to change it before programming otp memory.
i just buried that device and told everyone it is not working properly1 -
Goddamnit I am an idiot. I just fried a microcontroller because I didnt have the right power supply and I used it anyway because fuck it, right? So now I am not a single step closer to the thing I was trying to do but I fucked up my hardware and it is a huge pain in the ass until I get a new one and figure out all the problems with it. Arghn7
-
At the age of 10 I got interest in ''changing computer'' things. I started to watch over the shoulder (I don't know if you can say that in English ¯\_(ツ)_/¯ ) of my dad. He programmed I2C and other microcontroller.
I started with little batch files and Visual Basic. I think we all know the ''Virus'' with shutdown 😂
At school in the computer lesson we learned a few other languages. I was the only one who learned these languages at home too. The biggest problem is that you think ''I learn at school and at home I can play games''.
Some day I started to learn PHP and Java at home. I came to Java with Minecraft. Yes, Minecraft. You can learn so many things (like the structure of a network packages from the server) and you can visualize everything with blocks.
Since the professional colleague we learn C# and Python which I use in some projects at home too, for example for the rasperrypi.
Now I'm 17 and I can C#, Visual Basic, PHP, JS, Python, JS and HTML1 -
[Hardware geeks, microcontroller geeks, please come]
Yet another Hacktoberfest tshirt...
Gotcha? (I bet you know who I am)
Just kidding. Just a random project idea I am not sure if it is possible to make from scratch.
It is essentially a usb external storage
About 32gb
And has a lcd that shows available storage space
And some buttons to play snake. (Yup)
Is it possible?
What should I expect when creating from scratch? (Microcontroller, c language, interfaces, etc)13 -
When you need to work with the register of your microcontroller but you fuck up the addresses. I wasted so much time looking at my code to figure out what I'm doing wrong. I tried everything, looked up the datasheet again on how to initialize everything and in the end I fucked up the fucking register addresses. Three addresses had, at the offset, one 0 instead of two.
I never felt so dumb in my life -
I'm working on a firmware for 3d printers. I had to send a lot of data to another microcontroller and I was making a very sophisticated protocol. When finished I was so proud of my work but in that moment I remember that there is a thing called JSON but I didn't care. Now I have to send the same data to a webserver and need to move from my own protocol to JSON.
Fuck me. -
So I'm studying at a university where everyone who studies electronics has to do the same "internship" where we have to program some microcontroller.
For most of us it is the first time programming with pointers and working with the register (C++). But the institute who does this shitty internship manages to FUCK up the class description and even the classes and methods they give you.
In the class description there are methods missing so you have no idea what they want you to do with that method and then they write stuff in the class description that aren't in the class and you don't need. For fucks sake how can you fuck up such a simple task.
And then their shitty template is wrong. If you expect your students to do well please for fucks sake make sure you give your students the correct classes and descriptions. Many students won't fucking know what is wrong because the never programmed in C++. The best part is that they are doing this "internship" for more than 5 years.5 -
I am trying to reverse engineer a fingernail hardening device for rapid hardware prototyping (becoming some kind of hardware developer I guess)
Since it is a fucking mess (all cables are black) they've chosen a weird construct to operate microcontroller on 240Vac (seems to be possible and made in very low energy consuming devices) i do not find any datasheet for one of the used products. It would help a lot but no. And messing around with high voltage is no fun.
I'm unsure if this fits as a dev rant since most/all I've read so far are software-related.9 -
I just saw that ARM released their design start IP for Cortex M0 for free to the masses , it’s obfuscated verilog code.
I worked on SoC design based on this in college but it took a lot of paper work to get these file but now they are free to download
This is exciting as this makes a open-source community based microcontroller design possible.
Only missing piece here is the verilog compiler they use is not open source .
Has anyone messed around with Cortex M0 DS + ghdl or iverilog. I am about to start a little side project will update more on this19 -
This was initially a reply to a rant about politics ruining the industry. Most of it is subjective, but this is how I see the situation.
It's not gonna ruin the industry. It's gonna corrupt it completely and fatally, and it will continue developing as a toxic sticky goo of selfishness and a mandatory lack of security until it chokes itself.
Because if something can get corrupted, it will get corrupted. The only way for us as a species to make IT into a worthy industry is to screw it up countless times over the course of a hundred years until it's as stable and reliable as it can possibly be and there are as many paradigms and individually reasonable standards as there can possibly be.
Look around, see the ridiculus amount of stupid javascript frameworks, most of which is just shitcode upon vulnerabilities upon untested dependencies. Does this look to you like an uncorrupted industry?
The entire tech is rotting from the hundreds of thousands of lines of proprietary firmware and drivers through the overgrown startup scene to fucking Node.js, and how technologies created just a few decades ago are unacceptable from a security standpoint. Check your drivers and firmware if you can, I bet you can't even see the build dates of most firmware you run. You can't even know if it was built after any vulnerability regarding that specific microcontroller or whatever.
Would something like this work in chemical engineering? Hell no! This is how fucking garage meth labs work, not factories or research labs. You don't fucking sell people things without mandatory independent testing. That's how a proper industry works. Not today's IT.
Of course it's gonna go down in flames. Greed had corrupted the industry, and there's nothing to be done about it now but working as much as we can, because the faster we move the sooner we'll get stuck and the sooner we can start over on a more reasonable foundation.
Or rely on layers of abstraction and expect our code to be compilable on anything the future holds for us.2 -
Whose fucking idea was it to still consider assembly (with C being optional) as the most relevant language in electrical engineering school?
Also teaching like 74HC and Op-Amp IC's are still the most common thing in todays electronis is really grinding my gears!!! Is it still an argument that your 8 NAND gates are essentially the same price as a low cost Microcontroller?
But one can be modified within second and the other you potentially need to redesign the entire board.12 -
Fried two devices today by simply connecting them to a power source.
Changed nothing in the circuitry, no shorts due to solder residues (a simple modification was made), no changes in the input parameters. Check.
The afromentioned devices should have only minor HW changes compared to a previous version I'm working with and as far as I can see absolutely nothing which should cause the damn microcontroller to release smoke like a steam train. (All right, a very miniature steam train.)
So the only significant difference might be the firmware which I didn't check yet but will tomorrow. Not my code and the corresponding IDE just basically sucks. Yay.
On the other hand, the Software part finally feels like I'm getting somewhere. It seems just ... to work. Very suspicious.
Feeling ambivalently frustrated and relieved at the same time. Sigh.7 -
Hi,
I have created my own C# application that burns .hex file in atmega8 microcontroller using avrdude.
Or users can burn .hex file by using avrdude alone.
Is there any way I can stop this. I mean that user cannot burn hex file without my application.7 -
So here is my take on a shitty teacher.
I once had a microcontroller teacher, who tried to teach a class of non programmers how to code, from a broken compendium. While he was teaching he would correct errors that he found. Most of the classes would be pure theory on C and no exercises.
Needles to say after the first two semesters none of the students could program, and over half of the class had left the school. -
<sarcasm> best advice?
Write microcontroller code in C++ even if the underlying OS won't understand. You can always decompile the program to C code and use the generated code.
Things he forgot to mention:
- cannot use most of C++ core functionality (basically no STL, no exceptions, all of C++11)
- have to get your code to compile twice (C++ and C afterwards)
- debugging that generated C code is a pain in the ass
- have to debug twice -
I got to thinking it might be nice to have my own personal fingerprint reader. I could carry it with me and hook to my work computer for tasks such as sudo and login. At home I could login. I figured there ought to be some nice cross platform devices... Oh hell fuck no. Its all Windows shit. Most of them say windows 10 and usually say don't work on Linux, Mac, or Android.
So I think I am going to hack my own:
https://amazon.com/FlashTree-Optica...=
https://amazon.com/Seeeduino-Smalle...==
I have a 3d printer that I can use to enclose this and make it look nice and personalized. I can embed any kind of functionality I want to make this work.
Manufacturers: STOP MAKING SHITTY WINDOWS ONLY HARDWARE!7 -
Asked a question on SO,
Why is my Microcontroller (Android things IOT) not getting detected in my Mac to flash an image?
Someone commented:
Mac doesn't provide enough power to it.
(Really, I can see a green light on the board)4 -
Programming Siemens PLCs is the same like using windows. Pretty comfortable - if you are fine with using it like 85% of the users.
Spent 10h today finding a way to realise an interrupt everytime a specific variable is set.. Every damned microcontroller can be used to! - _-
And therefore this typcial windows user question:
Is it not intended by Siemens or am I blind?
I mean i know you can use some prefabricated interrupts.. Like the cyclic interrupt OB.. I can't believe that it's not provided to freely create interrupts?!
Someone with an idea? -
just has a discussion with a web developer didn't go well
we have to make a site. server side and client side has to be implemented it has realtime data also
Now his solution was aws + Python script for sever and a client web app that will show the data
i suggested firbase for server and client web app , cause it will be cheaper for us
he said that its more work for him to do firebase and application cost will be high
i am my self a developer ( worked on Android , web , but mostly microcontroller and hardware)
i don't understand cause from what
i see firebase is straightforward
am i wrong ?2 -
I would really like to get into electrical engineering and microcontrollers, but I dont have any (real) experience with circuits and stuff.
Can anyone recommend some books, starter kits, good microcontrollers or youtube channels?😄3 -
void main()
{
if( isWeekday() ) {
if( alarmRinging() || kidsKnocking() ) {
startMorningRoutine();
escapeToOffice();
while ( !meetingsInProgress() ) {
code();
} //meetings interrupt the whole day, every time...
escapeMeetings(); //Go home.
startEveningRoutine();
} else {
sleep(1);
}
} else {
playWithKids();
doYardWork();
if( kidsSleeping() ) {
sleep(1);
}
}
} //end main. Like a microcontroller, this forever loops. :) -
New to the the electronics stuff and I'm building a word clock. Recommendations for a microcontroller that has at least 22 outputs (22 words to light up). Something from Arduino? Also need to plug in for power and use an RTC.5
-
I am working on an embedded system, a microcontroller-based design. The system has an Ethernet port. I am using NetX framework in the microcontroller firmware.
The DHCP Client is executed properly, an IP address is assigned correctly when connected to a router. I connect a laptop to the router using a LAN cable. Then TCP sockets behave the way they should, UDP broadcast behave the way they should. The only issue is, when I connect a Laptop over wireless to the same router UDP broadcast are received on application on Laptop, but data sent is not received on the embedded device.
Any idea why?
Platform:
Laptop is Windows
Embedded Device: Renesas S7G2, NetX framework.4 -
Wtf is this ESP32 shit and it's hype?
I bought one because I thought JS on a microcontroller? That's gotta be fun!
I'm a hobbiest when it comes to MCUs and I do JS as a job, so I tought I'm made for this and I know at least as much as all the kids on the internet doing it.
Nothing makes sense with this shit. You have to flash wildly compiled modules of WHATEVERTHEFUCK with fucken python development-kits which have something to do with Lua to give you some kind of node-REPL which answers you with a bunch of strangely-looking errors starting with "stdin:x:".
If this NODE-MCU shit is made for JS why is there stuff about Lua everywhere you go with this, I don't get a single thing. Now I'm sitting on about 3 different git repos of sdks or what do I know and know less than before.
Oh and there is actually not a single tutorial really targetting the esp32. it's all about that 82xx-model.
Then I start googling around a bit more - It's not even ES6, it's just some ES3/5 shit. Why would you even do this. That's actually harder to manage than classic C/C++. You get no gain with it. Fuck me.
Wtf bro.23 -
I compiled/built the TinyML book demo using the Sparkfun Edge microcontroller, which lets you load trained deep learning models onto an extremely low-powered device for edge computing. The board runs inferences, albeit slightly inaccurately. It's a great demo that runs out of the box, but there's room for improvement...which is totally part of the fun!
https://tiktok.com/@jasonsalas671/...4