HACKER Q&A
📣 darksaints

Learning robotics/electronics beyond Arduino?


Background on me: I am a fairly adaptable person with a background in supply chain management but making a living as a data engineer. I've done some machine learning work, a lot of data work, and I've also done quite a bit of mathematical optimization work (LP, MIP, IP, CP). Mostly working within the Java and/or Python ecosystems, but have done a bit of Rust and F# as well.

I'm currently trying to learn electronics / robotics / control theory and I'm struggling a bit as I feel like I've fallen into a gap between extreme beginner and extreme expert. I guess to some extent that is normal, but it seems like everywhere I go for help on something new I get pushed back into the Arduino ecosystem. I'm sure it's possible to take Arduino to a much bigger level, but I'd like to learn some more intermediate concepts like:

* How to write code targeting a non-Arduino microcontroller, preferably with a newer language like Nim, Rust, or Zig (I really value the benefits of higher level languages)

* How to use an RTOS like FreeRTOS, Zephyr, or L4. More than just installing it and running Hello World... I'm looking to take advantage of their actual benefits over the OS-less alternative.

* How to interface with and control devices beyond GPIO pins and PWM protocols.

* How to write actual drivers (instead of doing everything in a `void setup/loop` construct), including any sort of design patterns or general rules for producing higher quality and more reliable and robust code.

Are there any good resources for this sort of jump out of the Arduino ecosystem? More advanced concepts that would allow for building an actual product instead of a weekend project?


  👤 topspin Accepted Answer ✓
It's hard to beat ST's Discovery and Nucleo products. ST has been providing a large variety of low cost dev boards for their STM32 MCU line-up for over 8 years now. These dev boards host MCUs that are widely used in industry. ST has been diligent in keeping these boards available and easy to obtain. I particularly like the Nucleo boards [1]; they're very high quality and range from low power STMF0 to the very powerful STMF7 MCUs and they have Arduino compatible headers. Avoid the original STM32VLDISCOVERY board from 2014 (despite its frequent mention on old blog posts); it had early ST-Link (v1) interface that creates a lot of frustration. Subsequent boards use ST-Link v2/v3 that "just works."

Once you have a board the next step is ARM's Keil Studio Cloud if you want the "Arduino-like IDE experience." They formerly provided the MBED platform, which was very good, but they've recently transitioned it to the Keil online IDE. These tools can push compiled code to your attached ST dev board through your browser; nothing to install. The GNU GCC ARM stack is easily used with ST-Link as well.

There are a large variety of RTOSs for these boards. ChibiOS/RT is a good place to start. ARM's Open Source MBED-OS is another.

Embedded Rust developers often target these boards.

[1] https://www.st.com/en/evaluation-tools/stm32-nucleo-boards.h...


👤 qup
If I had your ML background and was interested in robotics, I'd be looking at quadcopters. I think they're the most interesting robot tech currently, and I don't think they're going anywhere. Capabilities will continue improving.

I wish I had the ML background to work on some autopiloting.

I'm in a similar spot, but I have no electronics/robotics experience at all (besides building an FPV drone). I'm just a programmer. I searched a lot for "cool arduino projects" the past few days, but I couldn't really find anything that appealed to me.

I think i'll probably use some, but it'll end up being practical. Like one to monitor the level of my rainwater tank or something. Not fun, robotic-sy stuff.


👤 robotguy
You could try a Raspberry Pi and some motor controller hats from Pololu. You could then use any language that has a GPIO library.