Hacker News new | ask | show | jobs
by NalNezumi 210 days ago
Anyone have any advice for Arduino replacement? I recently (unknowingly) bought a R4 for some LED projects but knowing now the background, I'm wondering if there's any other alternative for hobby (noob level) micro controller project
5 comments

I've played with a lot of boards, including Teensy, Seeed XIAO family, some boards from Adafruit and SparkFun, and one Chinese copy of a Chinese ESP32 board.

For my work projects, I use Teensy because it's the screaming-est processor, and I use its computing power. The cost isn't exorbitant since it's typically re-usable unless you want to turn something into a permanent installation.

I suggest play with what you've got until you get sick of it, or run into a hardware need that would be better served by another processor or board. Or choose a new board when your R4 goes into something that you want to keep.

I've tried to maintain a "platform agnostic" approach, where I stick with the general Arduino API and processor-independent libraries as much as possible, and only drop down into the vendor-specific libraries when there's a real performance reason. This makes it easier to switch boards if needed -- a lifesaver during the chip shortage, and possibly important under present day supply chain uncertainty.

Doing it this way will give you the benefits of drawing from a broader range of tutorials and docs, while also providing a gentler learning curve on working with the low level chip-specific stuff.

(one of the best comments and advice so far)
Any ESP32, RP2040 or RP2350 board. The last two use external QSPI flash, so hobby projects only. There are no fuses to set to read protect the firmware.
The RP2354 has the flash stacked inside the chip; https://www.raspberrypi.com/news/rp2350-a4-rp2354-and-a-new-...

Still can be reflashed if you have access to the right pins, but I believe there are more security features built into the later generations of these chips (plus some security fixed from the original 2350 design).

Just to be clear, some micros (STM32s come to mind) have what they call "on the fly decryption" for external flash. Basically, if the micros wanted to, they would. I think ESP32s are also using qspi flashes but they're integrated in package? Maybe that's changed but that's how I vaguely remember it
I believe only the ESP32 modules with 16M have QSPI flash, the 4M standard flash is on chip. For on the fly decryption you need on chip enclaves to store the keys. Anyway, it doesn't really matter for hobby projects and the ESP32 can also be used for commercial projects.
Indeed, the number of "non commercial" projects using these chips that are set up much less securely than even modest "hobbyist" projects boggles the mind.
I use a RP2040 in a commercial product, but it's for a niche portion of a niche industry and it's not intended to ever communicate with another device. Disabling USB mass storage and not adding a bootloader button is good enough for me.
Depending upon your project, perhaps the new MakerPort might be a good fit? https://makerport.fun The basic kit comes with a built-in speaker, a bunch of LEDs, a servo, an LED matrix, and other goodies. The default firmware works with Scratch, Snap, and MicroBlocks, but I believe you can also use your own custom firmware.
Pine64 has products that are far more open than Raspberry Pi products, and still have good community support. They also have several RISC V products, which are quickly overtaking AVR, PIC, and ARM Cortex M0 microcontrollers.
nrF52