Is it advisable to stay stick to Arduino IDE

arduinomicrocontroller

Is it better to move to AVR studio (or any other better alternative?) over the Arduino IDE. Feel like it's so simple and childish. I need to know the experts idea and choice..

Best Answer

A huge advantage of using e.g. AVR Studio is the ability to use all the libraries made for ATmega168/328 before the dawn of Arduino. FFT libraries, libraries for using some obscure IC you have purchased, rudimentary digital filters, and many more can be found on AVRfreaks and hundreds of other hobby sites.

You can also write more efficient code if you learn how to utilize standard AVR libraries and study the microcontroller's datasheet (or tutorials). For simple applications, arduino code is easy to write and debug. However, sometimes you want to control the timing more efficiently. AnalogRead() needs 100µs to execute. That corresponds to 10ksps (thousands of samples per second). You can easily pump that to 70ksps if you access low-level code for the ATmega168/328. You can do all of that in the Arduino IDE, of course, but at some point your projects might become too complex, and you will want to write your own libraries with faster functions. AVR Studio might be more suited for that.

Also, if you ever want to program any AVR chip other than those offered by Arduino, you will need a programmer and a different IDE. Small projects that use 1kB of code can be done on an ATtiny. You can buy a dozen of those for the price of a single ATmega328. Those chips are cheap and have most of Arduino's capabilities: I2C, SPI, ADC. You can even find libraries that add a USB HID interface! No serial drivers or anything!

Personally, I first write code in the Arduino IDE, without code optimization. If it works, that code can be easily transcribed into standard C++ libraries and made more efficient.