5 ms·
Two reasons for me: Real product versus toy: The arduino libraries are not the standard AVR libraries you would use to program a real product. In a real produ
by forkandwait 9y ago
Two reasons for me:
Real product versus toy: The arduino libraries are not the standard AVR libraries you would use to program a real product. In a real product you would also never use an arduino, too expensive and bulky.
Also, the arduino ties up a bunch of pins and space compared to just the chip, for not much payoff in a typically sharp focus microcontroller use case.
I think the cost for a programmer is a wash when you consider that you only need to buy bare chips after you learn how to use the programmer.
- TD-Linux 9y agoReal 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.
- tmuir 9y agoAs an embedded developer, I would agree that there is this sentiment that arduino is somehow inferior, bigger code sizes, worse code quality, training wheels, etc. However, I've recently used a couple different Teensy boards in some personal projects, which are a line of 3 or 4 different freescale kinetis cortex M0-M4 parts that have their own plugin for the arduino IDE. I've been very impressed with the breadth of libraries, and how well it all works and integrates between different boards. The code is well written, and looks like it could easily be dropped into arm-gcc. Maybe Teensy is the exception, but there are some high quality Arduino codebases out there. Not being able to use in circuit debug tools is a huge pain, however.
- jpindar 9y agoA Pro Mini is 0.8 inch by 1.3 inch. What size do you consider not too bulky?