# Is it advisable to stay stick to Arduino IDE?

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..

• Why dont you just give AVR studio a try? Only you can decide whether it fits your needs and what is faster / easier for you. – PetPaulsen Sep 12 '12 at 12:21
• @PetPaulsen yeah, I know that's the best way. I'll do it soon (probably tomorrow). But just wanted to know how others see this. You can learn a lot more things that way too.. – Anubis Sep 12 '12 at 13:49
• The Arduino Visual Studio Pro plugin was recently updated to support Atmel Studio 6.1. Install is under 10 mins, any Arduino sketch can be opened, edited, compiled, upload + lots of other features such as serial monitors, examples explorer and optional Arduino USB debugger – Visual Micro May 17 '13 at 1:27

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.

It's simple because it has to be accessible to everybody, and that works: everybody and his little sister can program Arduino.

If you feel you can handle something more like Real Programming I would certainly do so. You'll have to write more code, but also will have more control. An important point: the Arduino library is horribly inefficient: functions like DigitalWrite and DigitalRead can be made up to 50 times faster.

• Wow, never realised it was that inefficient. I knew there were overheads, but... wow. – Polynomial Sep 12 '12 at 12:55
• Thanks for the news about DigitalRead/Write. Never knew that.. – Anubis Sep 12 '12 at 14:00
• @Anubis - I discovered JeeLabs myself only recently. They have one of the best blogs I've ever seen. Definitely recommended reading. – stevenvh Sep 12 '12 at 14:05
• There was a question a while ago about Arduino digital IO speed-up: electronics.stackexchange.com/questions/22585/… – Jon L Sep 12 '12 at 17:53

Most of the responses have focused on using the Arduino board as a standard AVR board. But you can also use a more advanced IDE and still take advantage of the simplicity of the Arduino coding and built-in libraries (along with the disadvantages mentioned above). EngBlaze just did a tutorial on this: Tutorial: Using Atmel Studio 6 with Arduino projects

The Arduino IDE trades code efficiency for convenience and speed of development for small projects. Because experts have deadlines too, it's perfectly acceptable to use the Arduino IDE for a quick proof-of-concept or to help debug another project.

If you want to specialize in embedded software development, you must be able to use more powerful development tools, such as AVR Studio, or avr-gcc and your preferred IDE.

Going beyond mastering the development tools, learning the inner workings of a microcontroller and knowing some assembly is definitely a plus if you intend to work on systems with small memory, and/or low power requirements, and/or high performance.

• Thanks for the detailed answer, I prefer that. I certainly agree with that, especially with the last point. Though I'm new to Atmel processors, I know a bit more about the internal organization of PICs and can do not so complex assembly codes. Though that seems a bit tough, you can learn the exact way how the microcontroller behave. I think many will find this answer usefull. Hope you'll get more votes, :D.. (and this is your first answer, eh?). – Anubis Sep 19 '12 at 3:19
• Nowadays, there is hardly any situation where being fluent in assembly (able to code without looking constantly in the documentation) is useful at all. Mastering your compiler, knowing its kinks, and the good options, is much more useful. Good luck. – Sylvain Sep 19 '12 at 12:03