3 ms·
Real products absolutely do use Arduino libraries, it's not a toy. They are just embedding the AVR directly for cost (and using an external programmer), but the
by TD-Linux 9y ago
Real products absolutely do use Arduino libraries, it's not a toy. They are just embedding the AVR directly for cost (and using an external programmer), but there's no reason the Arduino libraries don't work for products that ship. Arduino only eats two pins for serial - I suppose you could drop that if you wanted, but in practice most commercial products have a debug serial port anyway.
- forkandwait 9y agoAs I understand it the Arduino libraries are big, but I have never tried. What are the advantages to not just using the AVR libraries if you are embedding the chip in the circuit and using the programmer?
- TD-Linux 9y agoFunctions you don't call get stripped out of the final binary. The advantage is you get a bunch of high level functions like analogRead() that do all the setup for you. avr-gcc/avr-libc mostly just provides register definitions, so it's likely you're going to duplicate most of the code inside analogRead() anyway if you roll it yourself. That said, I've done plenty of projects with bare avr-gcc (especially for chips not supported by Arduino at the time) and it's not terribly onerous, but often you don't need that level of control for every little thing.