Remix.run Logo
zajio1am 8 hours ago

From Arduino ecosystem i always have a feeling that they try to do an unnecessary ecosystem lock-in. Most Arduinos are just Atmel AVR MCU with fancy bootloader. You do not need Arduino-this or Arduino-that for programming them, avr-gcc and avr-libc is enough.

phoehne 7 hours ago | parent | next [-]

From an embedded developer's perspective, Arduino is awful. That hero-loop programming is not what anyone should ever do. And experienced developers can get better results from something like FreeRTOS (or if you're a masochist Zephyr). And ESP32s are cheaper, as are RP2040s. ...

But take a room full of kids and get them to write a program that blinks an LED, or drive a simple 'robot' forward, and it's awesome. Easy to use. I've never burned out a board (even driving considerable current through them). Things are tolerably well marked. Lots of teaching tools. Lots of different suppliers of easy to connect motors, servos, lights, sensors, etc.

For the same reason, if you are not an embedded engineer, but need a simple micro-controller to turn something on an off like a heater in a chicken coop, it's fantastic. And if you want, buy the $5 knock-off Uno. It should be the same, except that it doesn't support the (now defunct) foundation.

adiabatichottub 6 hours ago | parent [-]

> From an embedded developer's perspective, Arduino is awful.

Specific AVR Arduino annoyances I remember:

* Strings loaded to RAM instead of program memory, so you use up all your RAM if you have a lot of text. Easily fixed with a macro

* serial.println blocks, so your whole program has to stop and wait for the string to be transmitted. Easily fixed with a buffer and ISR

* Floating-point used everywhere, because fuck you

* No printf(). It's in avr-libc, and it's easy plumbed in, but the first C/C++ function that everybody ever learned to use was somehow too complicated or something.

* A hacked-together preprocessor that concatenated everything, which meant you could only have your includes in one place, thus breaking perfectly good, portable code.

I think they ultimately did a disservice to novice programmers by giving them something that was almost a standard C++ environment, but just not quite.

kevin_thibedeau 4 hours ago | parent [-]

> Strings loaded to RAM

Modern AVRs have program memory mapped into the RAM address space. The GCC linker scripts for the parts that support this put strings into .rodata within that memory region, obviating the need for special macros to retrieve them. However, you won't find this on most of the usual suspects in the Arduino AVR ecosystem.

abstractbeliefs 8 hours ago | parent | prev | next [-]

I think it's important to understand the early development.

It's true that you can (and always could) use avr-gcc and libc, but the core sale was what makes it not this.

The "locked in"/captured API and IDE were directly extensions of a language and IDE called Processing.

Processing overlaid an art-focussed layer on top of Java, providing a simpler API, and an IDE with just two buttons.

Arduino was based on this - the same IDE format, similar API conventions (just on top of C++), precisely to allow these same artists to move into physical installations and art.

Arduino was not designed initially to be so general, it was tool written by and for this specific group of people, so has opinions and handrails that limit the space to provide the same affordances as Processing specifically.

oytis 8 hours ago | parent | prev [-]

There is no lock in, you can use avr-gcc with Arduino boards. Arduino is a portable SDK with HAL, you can add support for your own devices to it pretty easily

zajio1am 8 hours ago | parent | next [-]

Yes, i mean more like educational lock-in, trying to push their own tools and SDKs so people get used to them.

oytis 8 hours ago | parent [-]

The point is ease of use. It was designed for artists and other non-programmers originally. I've seen people who would never figure out how to use a crosscompiler do pretty cool things with Arduino.

ghurtado 7 hours ago | parent | prev [-]

The lock-in is that it's a big pain in the arse to use anything but their IDE.

Most vendor lock-in isn't "it's impossible to do the thing" but "it's hard enough to do the thing any other way, so this is effectively the only practical way to do it"

oytis 4 hours ago | parent | next [-]

But the vendor in this case is Atmel and the hard way has existed before Arduino was created. The contribution of Arduino was that they made the simplified path - it doesn't make sense to accuse them of lock in for that.

ErroneousBosh 4 hours ago | parent | prev | next [-]

> The lock-in is that it's a big pain in the arse to use anything but their IDE.

How so? It uses bog standard avr-gcc and avrdude. There is nothing stopping you from using those yourself.

What's hard about it?

MSFT_Edging 7 hours ago | parent | prev [-]

It's also possible to import the Arduino libs/headers and build against them with a little bit of Make.

I put together a simple setup to skip the arduino ide on an AVR design, but still be able to use their serial.println and other utilities. You can use it side by side with manual register masks for enabling IO.