That's a good article for the simple reason that it is written by someone who still had enough 'outsider perspective' that it can help guide other people new to the material in ways that old hands never could. It is impossible for me to tell a person new to this material what the pitfalls will be because most of what they will be struggling with is obvious to me and it would never even occur to me to explain it.<p>The site is a bit slow to load but if you are new to working with Arduino's and other small boards like that and want to play around with them it is worth the wait.<p>Title nit-pick: I'd have used 'low level programming' rather than 'hardware programming', programming hardware has a different meaning.
I actually thought this was about learning verilog or another hdl. I was a little disappointed, maybe I should write a blog about my experience learning an hdl as a software engineer.<p>Nonetheless them learning embedded systems programming is still an interesting read! Especially when coming from a language like C#
Yes, it is a different experience because with software programming we are letting system programs like the OS handle the hardware and we don't manipulate it directly. And computer hardware is standardised.<p>Where as when doing hardware programming, you have to necessarily understand the individual hardware to program and control it - there is often no abstract software lawyer in between to make this task easier for us. And the hardwares are quite diverse.
For any high level software engineer, looking to get into embedded development: A lot of Arduino, ESP tutorials do not teach you fundamentals. I recommend spending sometime (if not to code along) watching this course: <a href="https://www.youtube.com/playlist?list=PLPW8O6W-1chwyTzI3BHwBLbGQoPFxPAPM" rel="nofollow">https://www.youtube.com/playlist?list=PLPW8O6W-1chwyTzI3BHwB...</a>
This is why I went with a Computer Engineering degree instead of only a CS degree. I love software development, but I wanted to stay as close to the metal as possible.
Can't view the Web site (500 Bad gateway).<p>In any case, I sort of went the other way. I started in hardware, and gravitated towards software.<p>I think that each discipline could learn from the other, as most hardware, these days, relies on software as a critical part of its operation, and a lot of software is written as if the hardware on which it depends, doesn't exist.<p>I look forward to reading it, once the site is back up.<p>Happy Christmas!
Excerpts:<p>"The most basic pins are digital pins, they can only either be on or off. You would, for example, use them to check if a button is pressed. Or if you use them as output, turning a led on or off."<p>[intermediate content deleted for brevity...]<p>"And while those pins cannot output a true analog signal, they can use a technique called PWM to approximate one by only switching the signal on for some time."<p>Fascinating! Knew about digital pins before this, and PWM generally speaking (with respect to PC fans, power supplies, etc.) -- and yet, I did not proverbially put "2 + 2 together" in my head! (For some inconceivable reason I always conceptualized PWM as analog/multiple waves per unit time, in nature...) Yup, makes a ton of sense!<p>Anyway, thanks for the great article!
Right now is a great time to learn about lower level, "on the metal" type programming! Has been for a while now.<p>People, like Ben Eater, are making great kits.<p>Components are not so expensive. You can (and will) fail. Get more, get gear, try again.<p>One can get good gear, scope, meter, solder station, etc... at good prices. Used pro gear is a good option too.<p>Making things, signal generator, logic analyzer, are also fun projects.<p>And there are many programming options from assembly to Python showing up.<p>I love this stuff and often couple it with retro computing. The speeds are low enough to make most things possible for fairly new comers.<p>Jump in. It is fun!<p>Great post OP.
<a href="https://blog.athrunen.dev/content/images/2019/10/ESP32-Pinout-1.png" rel="nofollow">https://blog.athrunen.dev/content/images/2019/10/ESP32-Pinou...</a><p>Weird, the breakout pin between IO21 and IO19 is silkscreened GND, but the label says NC, not connected. The dev board datasheet[0] says that pin is not connected, which would be a fun trap for someone who tried to use that pin as a ground, but a different schematic on the site says it's tied to module ground. They don't seem to have a PDF of the actual PCB anywhere I can find.<p>0: <a href="https://www.espressif.com/sites/default/files/documentation/esp32-wroom-32_datasheet_en.pdf" rel="nofollow">https://www.espressif.com/sites/default/files/documentation/...</a><p>1: <a href="https://dl.espressif.com/dl/schematics/ESP32-Core-Board-V2_sch.pdf" rel="nofollow">https://dl.espressif.com/dl/schematics/ESP32-Core-Board-V2_s...</a>
Also, might wanna learn some basic electronics.<p>With very modular devices, it's easy to avoid that - since you're basically building stuff like as with lego bricks, and things are abstracted form you - but if you need / want to build your own sensors, or customized setups, you'll need to know a thing or two about electronics / circuit analysis and design.
The website is down <a href="https://web.archive.org/web/20191225131030/https://blog.athrunen.dev/learning-hardware-programming-as-a-software-engineer/" rel="nofollow">https://web.archive.org/web/20191225131030/https://blog.athr...</a>
funny thing is, when "software engineer" as a term came along, it was a bit of a fuzzy term, but here in NZ a lot of people took it as someone who had a engineering background and understood something of electronics/mechanical/chemical/civil engineering, a number of courses made SE have a common first year with the other engineering disciplines. This was more my background I did software / electronic engineering and went into embedded systems for electronic/mechanical/software type systems. Though these days I do more "full stack" systems development but still highly involved in embedded development.<p>But of course, software engineer has no particular definition and lots of people use the term to describe themselves, even if they have no real engineering background.
My advice is to read the board and MCU datasheet. Check MCU's peripherals, and how they can be used in your application. Some MCU's have a PPI (Programmable Peripheral Interconnect) it is clever to use it, as peripherals can operate independently together from the processor, especially combined with direct memory access. Learn bitwise operations as you'll need it to configure the peripheral's registers. Use a logic analyzer to confirm the bitstream to pinpoint errors.<p>Lately I started experimenting with radios. It is difficult. Let me know if someone has a good guide they read.
I don't feel like creating a userid on his website just to tell him this, but one thing he seems to have missed that may have caused some of his problems is that the ESP32 I/O pins are 3V and NOT 5V tolerant. Elsewhere in the article he seems to assume 5V levels (when he's talking about using PWM to output 2.5V from a 5V pin). With an ESP32 or ESP8266 when you need to interface with 5V devices you should use a level shifter.
When I wanted to learn hardware programming for a similar small project, I took on online course [1]. It took a few months, but it gave a pretty solid framework to start from.<p>[1] <a href="https://www.edx.org/course/embedded-systems-shape-the-world-microcontroller-i" rel="nofollow">https://www.edx.org/course/embedded-systems-shape-the-world-...</a>
All those multi-function pins! That implies a boot-time setup where you tell the system on a chip what each pin is supposed to be doing. Lots of bit field constants to construct. Often more trouble than hooking up to the pins.
This is such a gem of a post. I learned the hard way too and I wish this post was posted 5 years back! :) All the best to the author for his future projects.