logoalt Hacker News

stack_frameryesterday at 1:44 AM9 repliesview on HN

Probably off topic, but what's the best way to get started with embedded development? I've been a web developer for over a decade, but I'd really love to try something much lower level, and I'm currently making my way through the Rust book. I've got a Raspberry Pi on the way, but I assume that's not truly embedded development.


Replies

apitmanyesterday at 5:11 AM

I bought one of these on Amazon last week for $25:

https://www.waveshare.com/esp32-c6-touch-lcd-1.47.htm

I've been really impressed. It's basically a hackable Fitbit with no strap or battery. Full wifi, BLE, 6-axis motion. It's was really easy to get the C demos running. LVGL is awesome. Can't speak to Rust. I get enough of that complexity in my day job.

Other brands that look good for beginners are Elecrow and Makerfabs.

I specifically wanted to get into RISC-V, but they all have boards for other architectures as well.

show 1 reply
5d41402abc4byesterday at 8:38 AM

I would recommend getting a ST nucleo board over raspberry PICO or ESP32. The nucleo boards have integrated SWD programmer which makes flashing easier. You can also use it to debug your code. Try to get one with onboard USB port (like https://www.st.com/en/evaluation-tools/nucleo-f767zi.html) so that you can build USB projects.

show 1 reply
bschwindHNyesterday at 3:15 AM

Buy a dev board with an RP2040 in it, an electronics starter kit (resistors, capacitors, LEDs, diodes, breadboard, breadboard cables, etc.) and start writing some code!

If we're talking Rust, rp-hal is great for starting, and of course Embassy is great too, though maybe Embassy is better for later when you start running into the types of problems that it aims to solve.

rp-hal: https://github.com/rp-rs/rp-hal

Rebelgeckoyesterday at 2:06 AM

Raspberry Pi lets you play with GPIO which is a big aspect of embedded (even if it's running Linux instead of FreeRTOS or whatever).

If you want to take things a bit closer to bare metal, check out ESP32 boards. Super cheap from China and you can find them with all sorts of cool form factors with lipo battery chargers, screens, etc.

show 1 reply
devilsdatayesterday at 1:48 AM

I don't think a regular Raspberry Pi counts as embedded, although from Embassy's documentation, there is a version of embassy for the Rapberry Pi Microcontroller.

https://docs.embassy.dev/embassy-rp/git/rp2040/index.html https://www.raspberrypi.com/documentation/microcontrollers/

show 2 replies
guitarbillyesterday at 3:57 AM

I'm a fan of the RP2040 chip. It's a good trade-off between being simple and capable. There are more powerful chips like the STM32's, but frankly there are too many variants and their data-sheets are nightmarish. And there are simpler chips like the Atmel AVRs, but the tooling sucks. ESP chips are also good, but I haven't kept up with them so can't give much advice.

You'll want a dev board, which has the chip plus some supporting components on it. The Raspberry Pi Pico is a good choice because it's so widely used and well documented.

If you care about Rust, you'll also want to get the Debug Probe. Worth the money.

If you don't care about Rust, any Adafruit dev board should run CircuitPython, have good documentation, and likely some projects you can start with. The reason I don't recommend these for Rust is because many of their dev boards do not "break out"/make available the connections for a debug probe.

Edit: Having a project you want to do is good, but just making an LED blink can be magical, too, especially if you haven't done anything with hardware.

PPantheryesterday at 6:22 AM

TLDR: - get in contact with people programming embedded chips in a local hackerspace - use https://wokwi.com/ to get started

I was in the same situation. I've been programming high-level languages for decades now and wanted to get my hands on embedded. I've got friends in my local hackerspace and while you can teach yourself programming those chips, it's good to know whom to ask when you get stuck. You can find a hackerspace near you here: https://wiki.hackerspaces.org/Hackerspaces

I've been programming C and Rust on Wokwi. I even simulates electronic components and stuff like switch-bounce-effects. It's very easy and can be used free. You can even use a local IDE like VSCode(ium) and. I've used it with one project and it speed up my project a lot. https://wokwi.com/

the__alchemistyesterday at 2:13 AM

Hey! This is broad advice, but I recommend thinking of a problem you find would be interesting. Maybe tangential to a hobby or your job, or just something that sounds fun. Then make it happen.