text:
Is an Arduino capable of running 24/7?
I'm making a simple Arduino web server and I want to keep it turned on all the time. So it must endure to stay working continuously.
I'm using an Arduino Uno with a Ethernet Shield.
It's powered with a simple outlet power supply 5V @ 1A.
My Questions:

Will I have any problems leaving the Arduino turned on all the time?
Is there some other Arduino board better recommended for this?
Are there any precautions that I need to heed regarding this?

First question!

Moderator note: we seem to be getting a lot of answers that state that it worked in their situation. If you have something technical to add to the question, feel free to answer. However, the technical answers seem to cover that it works. If you absolutely must state that your situation worked, it'd be better to add a comment.

You shouldn't have any issues keeping it on all the time, however, some thing to consider is any counters you may have, like the use of millis().
From the Arduino docs on millis:

This number will overflow (go back to zero), after approximately 50 days.

So for projects that are on for long periods of time, you may not see an issue immediately but something like this could pop up and cause errors down the road.

To be precise, millis is a uint32_t variable, so it will overflow ("go back to zero") in 4294967296 milliseconds, which is ~49.7 days, ~1193 hours or ~71582 minutes.

Then all you have to do is use another uint32_t that increments when the first rolls over.
Then you can enjoy roughly 5.846×10^8 years between rollovers.

A lot of the time, mills() rollover isn't really a problem because people tend to use millis() is a relative way. They will take the difference between two millis() calls, or they will take a start time, and check if millis() is greater than start+Time. Arithmetic rollover and millis() rollover often cancel out such that time2-time1 is accurate even if there is a rollover between them, as long as there isn't two rollovers. Often if your code uses absolute millis() values it can be refactored to use relative millis() logic.

if you do millis()-startTime  (with start time as a unsigned long, aka uint32_t), you'll always get a valid result unless more than one overflow is happened

To be more precise, the overflow happens after 49 days, 17 hours, 2 minutes, 47 seconds and 295 milliseconds.

The millis() overflow never has to be a problem. See millis() overflow ... a bad thing? for more details. Basically if you calculate time intervals by subtraction, using the appropriate data types, you will never have an issue.

Even if one doesn't use millis directly, I wonder whether one can be confident that neither of the imported libraries does.

A couple of things to keep in mind (outside of @Sachleen's mention of millis()):

Like any electronics, heat can be disruptive. The micro-controller itself isn't likely going to be a huge issue from the perspective of heat, but other components like the power supply might cause issues.
If your code uses EEPROM.write(), be aware that the EEPROM in your Uno's ATmega328P is only rated for 100,000 writes.

Running the Arduino 24/7 Shouldn't be a problem.
But be sure that you have a case that allows for ventilation and you keep it in a well ventilated area. Just like computers, if you do not keep them in an environment that can keep them cool, they will not stay cool.
Server load also should be a thing to consider, the more load there is on the server the more processing it has to do, and the more heat it will generate.

The ATmega does not have traditional low-power modes like normal computers, so load is irrelevant. If you're not doing active computation, it's just spin-waiting. Power consumption when running is actually pretty much static (except things like writing to the EEPROM/flash), at least for the ATmega MCU. There may be variations in the ethernet interface power draw determined by traffic loading, but nothing is likely to generate enough heat to be an issue unless it's in a perfect vacuum or on a heater or something.

Atmega328p has a low power sleep mode that draws ~0.1 uA.

Which would only be relevant if the code actually puts the processor to sleep.

Keep in mind that the flash and EEPROM have limited lifetimes (about 10,000 and 100,000 write cycles respectively) so if you're doing a lot of writing to those, they may become corrupted. In a test I did, an external EEPROM took about 3 days to start becoming corrupted.

While the documentation may list 10k cycles, many tests have shown ~100k is where problems start to occur.

EEPROM lifetime is minimum 100,000 write cycles according to the datasheet. I think I remember reading a test where corruption started at close to one million writes.

We've been running our Arduino-based RFID access system at Bloominglabs Hackerspace in Bloomington IN since late 2011 and aside from a couple power outages and software updates it runs around the clock, no problem. More recently we added a networked thermostat, same deal - it's running round the clock.

I too have an RFID access system running 24/7. The only time it "fails" is if the power goes off, because it runs from mains power. This has been running since 2011 with no issues.

Haha, hey Steve!

@NickGammon Yes, your system is cool, but why is auth not based on card DATA, but only token UID? Please show us a clever solution.

what's your point? that's unrelated to the poster's question.

Arduinos can run without issues for a really long time, though depending on local conditions and the intensity of computation you may have to attach heat sinks.
In addition, keep it well ventilated.
It depends on the program being used, too, if your server is serving a page every now and then, it shouldn't be an issue, but if you expect constant traffic then the Arduino may heat up quickly.
You'll also want to ensure stability of power supply, when running benchtop experiments with an Arduino this isn't a big issue, bit it can become an issue if transforming power from the mains for a permanent fixture.

There is no reason whatsoever to expect computational load to cause an Arduino to overheat.  As has been pointed out in the more fact-based answers, the normal case is to run at full load.  If there's a component that may overheat that will be the voltage regulator, but that is primarily a function of input voltage, since it is already running at nearly the highest expected current when doing nothing.

@ChrisStratton a Ethernet shield might vary power depending on usage. Also, the Arduino could be in a low power state (for example, sleeping between 12AM and 5AM).

I've never ran an Arduino for that long, but there shouldn't be a problem. One thing to watch out for is the input voltage.
While an Arduino is capable of handling 7-20v as input anything over 12v can overheat after longer periods of time and cause board damage. As a quick recommendation to avoid any overheating of the Arduino I would keep the voltage as close to 7v as possible.

I'd like to mention an issue that doesn't come up very often but can cause long term issues. Memory Leaks and Heap Fragmentation. Almost nobody mallocs in embedded stuff, but if you do, do it right.

You beat me to it, +1.

I believe the String class uses malloc and it's quite common.

Agreed. Especially with a web server, make sure you don't do anything that might fragment memory, like use the String class. However it is easy to avoid that. I have an Arduino running as a web server to let me know if my garage door is closed. That has been running for years.

I built a simple power monitor with my first Arduino. It is powered via USB from a web-server that in turn is powered via a quite substantial battery backup (which  does not have notification abilities).
It is also connected to a mobile phone charger plugged into a non-UPS power socket.
So if the power dies the Arduino sends a message to a little program running on the server. The server program in turn sends me an email notification.
It was installed in late September 2013, on the 23rd March 2014 - I got my first email!
So I have not seen a problem (it does not use millis() ) but it does sample the power every 5 seconds.

Is an Arduino capable of running 24/7?
This is a reliability question. In reliability, there are a lots of things to consider.

The software. There are more robust softwares. There are less
robust softwares. For instance, for critical applications, dynamic
memory allocation is discouraged, as it might lead to memory
fragmentation. Unfortunately, Arduino heavily relies on dynamic
memory allocation. This problem is exacerbated as most of the
Arduino board have a very limited RAM.
The libraries. Many Arduino libraries do have bugs (even those
built-in in the Arduino package, as simple as WString!). In normal
operation, such bugs may not appear at all. However, you can't hope
that "everything will be fine" and that "the user" (or subsystem)
will act as predicted. Libraries could also have their limits (i.e.
not properly bugs). For instance, many users already cited the
millis() function, which resets after 50 days. This, if not handled
correctly, might lead to severe bugs.
The reliability of the hardware (not even talking about cheap
Arduino clones...).  Here a new class of subquestions opens. I will
cite only a very limited subset.

Are the Arduino Boards designed for reliability? (e.g. what's the
reliability of the used capacitors? and other components?)
Robustness against EMI ? I wouldn't rely on that: most of Arduino boards have just two layers, and lack of a proper ground/power plane.
EEPROM (this is both software and hardware). Is your software using the EEPROM? Is implementing some algorithm to prevent cycling (repeated write/erase on the same cells)?
Flash memory retention time. Retention time decreases with temperature, and also with the number of programming cycles.
Ionizing radiation. Yes, even if the probability is VERY low, at least at sea level, the probability of radiation-induced single-event upset is not zero, and it adequate countermeasures should be taken (especially taken into consideration that the RAM has no hardware error detection) in critical applications.
The quality of the power supply.
The operating environment. A 25-°C controlled environment, or in a black box over the roof (70°C under the sun in summer)? The higher the temperature, the faster all the degradation mechanisms.
...

Still, you should not be surprised if your arduino will work flawlessy for many years. But this does not ensure that every arduino will.
Some countermeasures will increase the reliability:

Use the watchdog: it's better to reset a non responsive system, than
having a stuck/misbehaving one.
Avoid using any library that uses memory allocation.
Implement (if you use the EEPROM) an algorithm to preserve it!
Good power supply.
Avoid harsh evironments (high temperature, high humidity, large and continuous thermal cycles, etc).

It certainly can run 24/7. I either use 5V to the 5V pin, or a 7808 to the Vin pin to offload the vreg. Ideally it would be 6.5V, but I don’t have such supplies. You may want a decoupler cap on 5V though, to soak any minor spikes when powering up your supply.
Any hardware attached which runs at 5V, I feed with a 7805. You can use LM317s or LM350s in lieu of 78XXs, but you’ll need a few resistors for those, perhaps trimpots.

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
How to get HTTPS on Arduino?
Put plainly: is there a way to get an HTTPS connection on the Arduino?
I have been looking in to it, and I have found it is impossible with the standard library and the Ethernet shield, but is there a custom library that can do it?
What about a coprocessor, i.e. like the WiFi shield has? Anyone know if the Arduino yún has ssl?

you might be interested in this: http://stackoverflow.com/questions/15830333/arduino-due-https-support

The first question is "how can you get a connection with the Arduino?". If you use (eg) SIM800, it has HTTPS included.

MCUs mounted on Arduinos don't have the horse power to handle https connections.
Yún does handle https on the linux side, with software like curl, wget or python. Your sketch can just delegate the task to the linux side.
While curl works fine, despite having python preinstalled, you need to manually install python-openssl, since it's not available out of the box (due to disk space constraints)

When you say "Yún does handle https on the linux side" do you mean Arduino Yún or the Yún Shield ?

curl wget or python has nothing to do with https

(Disclaimer: I'm actually the author of the evothings.com article)
The Arduino UNO is more than capable at doing TLS. I've just finished up a blog post series on the topic. I have a working example of an Arduino UNO doing elliptic curve cryptography (sect163r2) to exchange an AES-128 key for continued communication.
http://ardiri.com/blog/utls_defining_lightweight_security_for_iot_part_1
...
http://ardiri.com/blog/utls_defining_lightweight_security_for_iot_part_8
I took an alternative approach to trying to make a true HTTPS connection - instead, this is using the same protocols under the hood but using an insecure communication channel to do so. Pretty much TLS on HTTP.

I list this as an answer for the sake of having it linked here. It is not full https yet but he is working on it and it may be doable in the future
http://evothings.com/is-it-possible-to-secure-micro-controllers-used-within-iot/
here is a benchmark he did encrypting a message using a 1024 bit public key
Arduino UNO       16Mhz AVR               ==> 12596 ms*   8504 ms#
Arduino Leonardo  16Mhz AVR               ==> 12682 ms*   8563 ms#
Arduino Mega      16Mhz AVR               ==> 12596 ms*   8504 ms#
Arduino Due       84Mhz ARM               ==>  1032 ms*
Arduino Yún       16Mhz AVR + 400Mhz MIPS ==>   707 ms*
Intel Galileo     400Mhz x86              ==>   192 ms*

This is as far as he has gone with it but is in the process of setting up a test server to work on seeing how close to a full ssl/https implementation he can pull off.

Could you please put the most interesting details from the link you posted so that readers can see right away if it is worth reading further or not? Otherwise your answer would not follow SE policies and would have to be closed.

I don't think it is possible due to the size and complexity of the SSL Library, because the Arduino would most likely be under powered. That being said you could make the requests to a regular server and use some sort of PHP script to proxy the request to the HTTPS server. Not sure how well it would work though.
You may be interested into looking at this.

As Federico Fissore says above, the Yún can only handle HTTPS (or SSL, whatever you want to call it) on the Linux side of the Yún.
The first way to do it is using Python with Python OpenSSL. The way you do this is by issuing the following commands via SSH or YunSerialTerminal:
opkg update
opkg install python-openssl

opkg update will make sure the package list is up-to-date, and then opkg install installs Python OpenSSL. And then you can talk to the Arduino using Python. This page on the Arduino website should help you in using Python with Arduino.
You could also use curl with the -k option in your sketch. For example:
Process process;
process.runShellCommand("curl -k http://example.net");
while(p.running()); // this waits for the command to be done before continuing

Also, if you want to download a file, you could use wget. This would require you to upgrade wget by again issuing these commands via SSH or YunSerialTerminal:
opkg update
opkg upgrade wget

And then you can just do this in your sketch:
Process process;
process.runShellCommand("wget http://example.net");
while(p.running()); // this waits for the command to be done before continuing

is it also possible using Arduino Yún Shield ? instead of Arduino Yún !

Using of WiFi shield can be a solution - it supports HTTPS.
https://www.arduino.cc/en/Reference/WiFi101

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
What are (or how do I use) the power saving options of the Arduino to extend battery life?
For solar & battery powered projects, decreasing power consumption is a necessity.
I know a little bit about using a timer and interrupt to put the microcontroller into sleep when it isn't doing anything.
I have also read that you can disable some peripherals to further save power.
Here is a page explaining these: Power Saving Techniques
My question:

What other techniques are there to save power?
Are there any libraries that make using these AVR features easier?

Note: I wanted to point out that, even though my answer was accepted, the reader (you) should really read Anindo's answer first if you really want to save energy with any Arduino board. Once you address those items in your design, then you should read my answer and worry about how to set the MCU into low power mode.
Having said that, there are several techniques to make an Arduino save power. I'll list a few and then point you to a page that explains them all in more detail.

While the controller isn't doing anything important (between one read of a sensor and the next, for example), you can put the controller into one of the sleep modes below, with the command set_sleep_mode (SLEEP_MODE_PWR_DOWN). Next to each mode is the approximate power consumption of each mode.

SLEEP_MODE_IDLE: 15 mA
SLEEP_MODE_ADC: 6.5 mA
SLEEP_MODE_PWR_SAVE: 1.62 mA
SLEEP_MODE_EXT_STANDBY: 1.62 mA
SLEEP_MODE_STANDBY : 0.84 mA
SLEEP_MODE_PWR_DOWN : 0.36 mA

Disable brown-out detection (the circuitry that turns off the controller when low voltage is detected).
Turn off ADC (analog to digita conversion)
Use the internal clock

Then, when you put the controller to sleep, you need to use one or more mechanisms below to wake up the controller and do something with it:

Wake up with a signal
Wake up with a timer

This is a summary I made from -

Nick Gammon's article: Power saving techniques for microprocessors.

That article applies mostly to ATmega328P, but the technique applies to other Arduino compatible controllers as well. As TheDoctor said well, you will need to check the datashet to make sure your controller suports any of those techniques and how to do it more precisely.

Thank you for referencing my page www.gammon.com.au/power. Employing all techniques mentioned on it should enable you to consume around 100 nA (0.1 µA). Other techniques which can have a big impact are to run at a lower frequency, and a lower voltage. Plus what Anindo Ghosh said about not using voltage regulators. I made a Temperature and humidity sensor - battery powered which employs a lot of these techniques, which is still going strong, after a couple of years on batteries.

@NickGammon - To be fair, I think your excellent article deserved a better reference, so I edited my answer to that extent. Thank you for the great article - very clear and complete! And welcome to Arduino.SE. It's good to have you here.

Realistically, the biggest power waster on an Arduino board is the linear voltage regulator on it.

As long as the microcontroller on the board, the LEDs, or any other peripherals, draw current, the linear regulator wastes power equal to difference between supply and board voltage x current drawn.
So, a first fix would be to disconnect the power indicator LED on the board, and not use any of the other LEDs as far as possible.
Second, supply the board with as low a voltage as possible that is just sufficient to power the on-board regulator.
On the original designs, the voltage regulators used do not boast low quiescent current. This means even with nothing drawing power within the board, the regulator itself wastes a fair bit of power all the time it is on.
An easy fix is to replace the on-board regulator with an LDO (low drop-out linear regulator) rated for extremely low quiescent current. Parametric searches on various vendor sites will yield likely substitutes.
Even with the above steps, the Arduino board does not provide a mechanism to set the LDO into low-power mode, if the LDO chosen supports this. Power efficient designs typically use a "sleep mode" pin on voltage regulators to save a fair bit of energy - not an option here.

Even with all possible power saving modes and tricks applied at the microcontroller level, the Arduino simply is not designed to be an ultra-low-power device out of the box. Having experimented with several non-trivial applications, I have found that the best that is realistically achievable is some 10% to 30% power saving depending on application, since the voltage regulator and the LEDs are going to consume the rest anyway.

supply the board with as low a voltage as possible that is just sufficient to power the on-board regulator Or supply 5V through a hacked USB cable.

You could read through the 200-page datasheet, and then mess with some confusing bit shifts and registers, but I recommend this library: http://playground.arduino.cc/Code/Enerlib
Also, if you're using an Uno or any one with a usb-to-serial chip, you could disable that or remove it.

You should read through the data-sheet no matter what you're doing.

Once your project is working and you need to deploy to "production" environment, you can opt to replace the Arduino with a bare meta ATMega328 or any of the ATTiny family chips. This will get rid of all the power eaters on the Arduino board you don't need.
I found:

Arduino board of 9V block battery - 56 mA
ATTiny85 bare on 8 MHz without sleep modes etc - 10 mA
ATTiny85 bare on 8 MHz in sleep mode - 0.03 mA

Some more information
Program an ATtiny with Arduino
ATTiny files for Arduino IDE


text:
Installing a different firmware on Arduino
Is it possible to upgrade the firmware on an Arduino so that it can do more things such as change undervolting/ overvolting in order to provide more processing power. To do this you would have to most likely re flash the chip itself, so how would that be accomplished?

Most new functionality is provided by libraries and programming. What kind of "more things" are you talking about?

What TheDoctor said, what you mean by more things? Also, what are you referring to by "firmware"? The software/OS's onboard?

Should I just delete the question

@JVarhol If you can make it clearer, nah, keep it. Just explain to us what exactly you're thinking of...

I know you can install new firmware on the USB-serial chip so it can emulate a keyboard

Interesting to know

You can both over-volt and over-clock the ATmega328. With no active cooling, they will nearly all run at 6V and 30MHz. You can push the voltage further - 8V is possible sometimes, and you can get a few extra MHz out of them.
The point of this? Nothing. If you need more power, get a more powerful processor or stop using Arduino libs.

To answer the aspect of your question regarding the "firmware" on the ATmega328p MCU used in most of the Arduino boards:
There is no firmware on the ATmega at all aside from the bootloader. The programs you write are running directly on the hardware.
There are certain "fuse" settings which are set with a ISP programmer. However, there are only 24 of them (three bytes), and they largely relate to low-level configuration, and are not what I think you're asking:

There is also the Bootloader, which is a small program that sits in a separate segment of the MCU's program memory and allows it to update itself at startup (which is how all arduinos are programmed). However, it only runs for a short period of time at startup, and is completely removed from memory after the MCU has jumped to the main program.
Lastly, there are auxiliary MCUs (ATmega16U2/8U2) on most arduino boards that are used as USB-serial interfaces, that can be updated to behave differently (e.g. emulate a keyboard/mouse), but again, this isn't actually a change to the core processor, so whether it counts as "installing a different firmware" depends on how you define the arduino.
Really, I'd strongly reccomend reading the ATmega328P datasheet. This is the documentation for the MCU that basically forms the "Arduino". It should address what seems to be misconceptions.

Note the below chart, in regard to your under/over volting the device for different F_CPU, indicates the relationship. As a result you find most Arduino's run at 5V and a clock rate of 16MHz. While there are some 3.3V variants that run at 8MHz.

However, the core library provided with the IDE typically has specific #if's for both 8 and 16 MHz F_CPU speeds, not using a formula in most places.
Hence it is possible to do what you ask. However, you will find the core library limitations affecting. Tipping the cost vs benefit ratio, to that of the very intent. And then likely one would leave the Stock IDE and core libraries to a more makefile method.

Apparently it can be overclocked to 20 mHz

@TheDoctor - that's not overclocking. The ATmega328p is rated to 20 Mhz. Arduinos are actually underclocked to 16 Mhz.

@FakeName yes, I meant that you can modify an Arduino board to have the nessecary resonator to tun at 20 mHz

Oh, another side-note. You can generally exceed the safe-operating-area without major issues. I have a number of boards running 16 Mhz with 3.3V rails without issues. They may have stability issues at extreme temperatures, but it seems to work mostly fine at room-temperature.


text:
What does it take to compile Linux on Arduino, if at all possible?
Is it possible to run Linux on Arduino? If yes, what steps and limitations need to be considered? If not, what are the limitations that prevent this?

http://hackaday.com/2012/03/28/building-the-worst-linux-pc-ever/

Use a RPi instead.

Linux is a very complex operating system, but it may be able to fit on an Arduino. Things to consider:

There is no current AVR port of the source code.
You would have no graphics, instead access the terminal over UART.
The filesystem driver would have to be rewritten to access internal flash or an external SD card.
It would be extremely slow! The ATmega328 would run at 16 MHz, or about 20 MHz max (overclocked). Most Linux machines run at a minimum of 400 MHz, and more with graphics.
You would probably need some extra RAM, probably a good idea to use an ATmega2650 (the one in the Mega), which has 16 times the RAM of the Uno. You could also use a Due (6x as fast as the Uno, more RAM).
You may have to write special USB drivers for OTG (on the Due) or MAX3421EE (Mega ADK, USB host shield).

In short, it would take a lot of time and effort, and probably would be too slow for everyday use. If you really want Arduino Linux, check out the Yún.

You would not "probably" need extra ram, you do need extra ram. Linux requires 1 MB+ ram. Also, the lack of a MMU would mean you'd have to figure out how to emulate one (or run ucLinux). Realistically, at best, you'd wind up emulating a more capable processor in the atmega, which would be an order of magnitude slower then native code. Even the arduino due doesn't have anywhere near the required ram.

Also, the ATmega328P has 2 KB SRAM, and the ATmega2560P only has 8 KB. That is only 4X the ram, not 16x.

It just doesn't have enough RAM. You'd also need to teach it to boot from flash memory, which would involve rewriting the bootloader.
You can instead use an Arduino Yun or a PCDuino; while not "standard" Arduinos these support Arduino shields and run Linux.
Or there's always the Raspberry Pi.

Why do you say Yun is not "standard" Arduino? I agree it may not be the most common, but it is an Arduino indeed.

@jfpoilpret Most Arduinos are atmega boards which run compiled C++ via avr-gcc and have a USB handling chip. They come in various shapes/sizes/powers, but they're essentially the same (Mega aside). It seemed pretty obvious that the OP was talking about these and not the Yun/etc, hence the distinction.

There's also the soon-to-be-released Arduino Tre, at least I'm hoping it's soon ;-)

The short answer is no.
Basically, you would need LOTS more ram then even the biggest ATmega has natively.
It is theoretically possible to add external hardware, and program the ATmega to emulate a more powerful CPU, and run linux on that. However, on a plain arduino, it is not possible.
It would be much more realistic to run linux on a Arduino Due, which is basically a AT91SAM3X8E CPU. However, you'd still need to add some additional SRAM and storage.
There are things like the Arduino Yun, but that is really a entirely separate linux module on the same PCB as a ATmega32U4, so I don't know if you can really count it as an arduino.

Possibly relevant: What does it take to run embedded linux?

There is a board called the pcDuino that can run multiple variants of Linux such as Debian, Ubuntu, Open WRT, LEDE, Raspian PIXEL (just to mention a few). This board is not a native Arduino, rather Arduino AtHeart, and is made by LinkSprite.

Arduino have a couple of boards that support running a variant of Linux called Linino:

The Arduino Yún is a microcontroller board based on the ATmega32u4 and the Atheros AR9331. The Atheros processor supports a Linux distribution based on OpenWrt named Linino OS. The board has built-in Ethernet and WiFi support, a USB-A port, micro-SD card slot, 20 digital input/output pins (7 of them can be used as PWM outputs and 12 as analog inputs), a 16 MHz crystal oscillator, a micro USB connection, an ICSP header, and 3 reset buttons.
The new Arduino Tian board is powered by Atmel’s SAMD21 MCU, featuring a 32-bit ARM Cortex® M0+ core and a Qualcomm Atheros AR9342, which is an highly integrated MIPS processor operating at up to 533MHz and feature-rich IEEE802.11n 2x2 2.4/5 GHz dual-band WiFi module. Qualcomm Atheros MIPS supports a Linux distribution, based on OpenWRT named Linino. The Arduino Tian has also a build in 4GB eMMC memory that will can be helpful to build your projects. It is possible to Switch ON/OFF the Linux port from the MCU to reduce the power consumption.
Arduino Industrial 101 is an Evaluation board for Arduino 101 LGA module. The ATmega32u4 microcontroller is integrated in the baseboard. The module supports a Linux distribution based on OpenWRT named LininoOS. The board has built-in WiFi (IEEE 802.11b/g/n operations up to 150Mbps 1x1 2.4 GHz), 3 GPIOs (of which 2 can be used as PWM Outputs), 4 Analog Inputs, 1 USB, 1 Ethernet signal on pin headers and a built-in DC/DC converter. Check out the assembling guide and simply connect your board to a computer with a micro USB cable to get started.

This is several years old, but maybe more pertinent as Arduinos get more RAM and 32 bit ATMega AVRs, etc. There's an obvious problem notably not in the most popular answer here. The Arduino uses an AVR MICROCONTROLLER, not a MICROPROCESSOR. This is a major reason why there is no port of linux. Microcontrollers are designed to perform a specific task, applications where the relationship of input and output is well defined. Microprocessors are designed to run a variety of apps on operating systems. Remember, from the beginning, Linux needed a memory management unit and could not run on 8088 or 286 PCs. Then there was μClinux, which originally targeted the Motorola DragonBall family of embedded 68k processors, for Palm Pilots. It was never particularly successful. You might have more success porting FreeDOS or even Minix than Linux, maybe something in assembler, but compiling an OS on a microcontroller is very impractical. Perhaps it's a challenging academic problem, but specifically counter to the purpose of using a microcontroller instead of a microprocessor.


text:
Yún boot from SD card
I have an Arduino Yún, and it only has 16mb flash onboard for the Linux. I was wondering of it is possible to put a bootloader on the flash that uses the sd card as a rootfs? i want to be able to do more projects on it than those that can fit in 16 MB flash.

Not an Arduino hero, but I think you're trying to do things with your Yun that you could better do with a raspberry pi. For instance, running Linux...

I like the Yun because it's smaller and less power-intensive than the R-Pi, and i can use it for stuff that doesnt require a GUI. I asked this mainly because i want to run a Bluetooth stack on it, and the entire bluetooth code is probably going to be bigger than the linux OS it runs on.

I'm not really sure if there's a full fledged Linux OS running on Yun (and any other Arduino). Did you consider a BT-shield? (see fi. http://makezine.com/projects/connect-an-arduino-to-a-7-bluetooth-serial-module/)

@puredevotion - The arduino Yun is a 400 Mhz MIPS CPU module running Linino (which is linux - it's a fork of OpenWRT), stuck to a ATmega32U4. It's not much different from a rPi at all. Have you looked at the Yun at all? You're answering like it's just a ATmega.

@TheDoctor - The Yun draws ~200-300 mA when idle. The rPi draws pretty much the same when idle. There is likely to be no meaningful difference in power consumption (you'd probably save more power by using a more efficient power adapter).

The high power ratings of the rPi are because the power supply also runs the USB periperals, so the supply needs to be able to run the rPi + two USB devices. They err on the side of safety.

Instead of booting from the SD card, would something like this which loads a sketch from an SD card work?

Do you want client or host mode? Also, would you accept an answer that provides an alternative way for BT?

And the Arduino team finally figured it out:
http://blog.arduino.cc/2014/05/06/time-to-expand-your-yun-disk-space-and-install-node-js/

In case of future link death, it would be good if you could include the pertinent points from the link in your answer

I am using Yun as well for my projects. I don't boot from SD card, but I store a lot of Python code there and it works for me. I've also seen this article that might be interesting for you. I haven't tried to do it on my Yun but I think it should work... This is example how to install node.js on the Yun (SD card), so in theory you could use the same approach for all additional software you want to run.
http://linino.org/doku.php?id=wiki:nodejs

Welcome to Arduino Stack Exchange! Can you please add more detail to your answer? Answers that are all or mostly links are not acceptable on Stack Exchange because the answer is useless if the site goes down. Maybe just quote a few sentences? Also, in theory you could use the same approach for all software you run: Can you expand your answer explaining how to do this? Thanks!


text:
"avrdude: stk500_getsync(): not in sync: resp=0x00," aka Some Dude Named Avr Won't Let Me Upload My Program
I made an awesome program the other day, and I wanted to upload it to my Arduino. After clicking the upload button, some mean dude named avr came along and stopped me, saying:

avrdude: stk500_getsync(): not in sync: resp=0x00

All I want to do is just upload my program, but avr won't let me. He's even unintelligible, so can someone tell me what the heck he's trying to say and how to get rid of him?

i.e.:
Whenever I try to upload a program to my Arduino, I get this error message:

avrdude: stk500_getsync(): not in sync: resp=0x00

What does this mean, and how can I fix it?

Pretty common error message, not always trivial to solve: http://electronics.stackexchange.com/search?q=avrdude%3A+stk500_getsync%28%29%3A+not+in+sync%3A+resp%3D0x00

Nice title! I've had that error myself...

+1 for the title :D... I really hate this dude as much as you did!

Try installing the driver (cp2102)for the arduino. That did help me out. Thanks for the previous answers ppl :-)

This June 2018 post solved it for me (1st answer): https://arduino.stackexchange.com/questions/51729/ch340-nano-avrdude-stk500-getsync-not-in-sync-resp-0xa4

I had the same problem and tried the common suggestions to no avail. I could see output from the old code in the serial monitor. I switched to UECIDE and it built and uploaded with no problems or changes. Not sure what's happening, but it was an easy fix.

I was working with NANO. And I found this problem can be solved by selecting old bootloader of 328 p

For me it was as simple as a bad USB cable. It was the same cable I used in the past but I guess it finally died. Important to note that if you're getting the sync error AND you also don't see your Arduino show up on your computer as an attached USB drive, then it's definitely a bad USB cable.

This is caused by a generic connection error between your computer and the Arduino, and can result from many different specific problems.
Here are some easy things that can often fix this error:

Disconnect and reconnect the USB cable.
Press the reset button on the board.
Restart the Arduino IDE.
Make sure you select the right board in Tools ► Board ►, e.g. If you are using the Duemilanove 328, select that instead of Duemilanove 128. The board should say what version it is on the microchip.
Make sure you selected the right port in Tools ► Serial Port ►. One way to figure out which port it is on is by following these steps:

Disconnect the USB cable.
Go to Tools ► Serial Port ► and see which ports are listed (e.g. COM4 COM5 COM14).
Reconnect the USB cable.
Go back to Tools ► Serial Port ►, and see which port appeared that wasn't there before.

Make sure digital pins 0 and 1 do not have any parts connected, including any shields.

If none of those work, you will want to try to isolate the issue by replacing things: try a different computer on the same arduino, try a different arduino on the same computer, and try using a different USB cable.
If the issue is with the computer:

Double-check all computer-related issues in the "easy fixes" list above.
Reinstall the IDE.
Reinstall the drivers.

If the issue is with the Arduino:

Double-check all board-related issues in the "easy fixes" list above.
Make sure the microcontroller is seated correctly.
You may need to burn the bootloader.
Replace the microcontroller if you have another one handy nearby.
You may have bricked your Arduino. Sorry :(

There are other possible causes. Your could have damaged the ATmega, you could have damaged the bootloader on the ATmega, you could have power issues, or a myriad of other possibilities. The not in sync: resp=0x00 is really a generic "ATmega not responding" message. Anything that could cause the ATmega to not respond can cause it.

So can I not have anything in 0 or 1 ever?

@Tim You can connect stuff to those pins, but you have to disconnect them if you want to communicate with your Arduino via the USB cable.

I got this error on my very first Duemillanove years ago. It was a dead UART chip (or connection from USB to UART chip). Very frustrating. I bought an AVR programmer and burned the bootloader. Purchased another CPU with bootloader preloaded. Wasn't until vendor sent a replacement that I was able to join the world of Arduino aficionados (and I now have two spare CPUs).

"Disconnect and reconnect the USB cable" works for me

The part about pins 0 and 1.  Kinda sucks when the whole point of your project is a 232 port on pins 0 and 1. UGH

"Press the reset button on the board" helped.

Thank you so much. This error went away when I removed my ethernet shield and tried uploading. You just helped me meet a serious deadline.

Could you please append also  Tools->Processor->Atmega 328P to Atmega 328P (Old Bootloader)    to the list of possible solutions.

Note about the bootloader: On the Arduino Uno and Mega 2560, there's actually two bootloaders! One on the microcontroller which the sketch gets written to, and one on the 16u2 which handles the USB stack and acts as the actual programmer for the sketch-micro. In my case, the 16u2 was the problem.

I bought a 3 pack of cheap rexqualis nanos on amazon. The first one I was trying kept giving me this error so I tried another and it worked fine...odd

For me it was a component connected to digital port 0

@TheGuywithTheHat: you were absolutely correct. I bought my board from Aliexpress https://www.aliexpress.us/item/2251832472713563.html?spm=a2g0o.order_detail.0.0.8149f19c0AgE4n&gatewayAdapt=glo2usa&_randl_shipto=US and was trying to use "Arduino Pro or Pro Mini" as my board which keep giving me this error, after I read more about the board I figured its based on ESP8266, so I installed the driver and then selected "Node MCU 1.0" which worked just fine. Thanks a lot.

Another fix:
Change Tools->Processor->Atmega 328P to Atmega 328P (Old Bootloader). Remind that the Processor option is only available when you select some specific Boards at Tools>Board.
This worked for my Arduino Nano with CH340, using Arduino IDE 1.8.5 under Linux Ubuntu 17.10. Besides, this will probably happen if you use IDE 1.8.9 or newer and you get an old or cloned Nano.

That was the solution! The new bootloader uses twice the baud rate (115200 instead of 57600).

You are the real MVP.

For a really old arduino nano clone (cheap one) this was what fixed it for me

Unfortunately, it can also mean that you burned your microcontroller. Were you doing anything dangerous right before you tried to upload a new sketch? Is the microcontroller still working, with its previously loaded sketch?

If none of the above steps work, try reinstalling Avrdude and the avr-gcc compiler. I had to do this after my Mega started suffering from this.
If you installed Avrdude and avr-gcc separately, simply uninstall them. if not, you may have to reinstall the Arduino IDE. These steps will depend on your operating system.

Its highly unlikely that the problem would be caused because of the toolchain being used. This is too extreme, IMO.

What is this installation process you are talking about? The arduino editor tool is just unzipped. There is no installation process.

In my case I hadn't wired the RTS pin of the FTDI chip to a capacitor which went to the RST pin of the Arduino Pro Mini.  Once I installed this connection, I no longer got the error and I was able to upload code.
Nick Gammon explains this in his forum.
I've added a picture of where/how the capacitor should be placed.

+1 for the nice picture of the usb programmer hookup directly to an atmega chip.

I also had some bad connections on my board, I unplugged everything and uploaded a basic sketch and it worked. Now go figure what cable is not in the right place

I am using ATMEGA8-16PC. I burned the bootloader onto the mcu with SCK, MISO and MOSI pins on the my Arduino uno. Do I then need to change the connections to TxD and RxD to upload sketches to the mcu? Like say making a LED at mcu's Pin 1 blink.

I've had the same message. Every time it has been solved by selecting the right port ie USB under the menu Tools then Ports. Its a simple step but I always forget. I'll unplug the Arduino to stop the current program, plug it in again to my computer to upload the new program and get the error, panic, curse, and only then, remember.

I had the exact same problem. I tried installing the IDE in another laptop and uploaded the program from that laptop. Problem solved. Then I came back to my laptop, uninstalled the IDE and re-install it.. it started working.
However, I wasn't satisfied because I couldn't find the source of the problem... so I tried running everything again the same exact way... I found the problem but not sure if that can be the actual cause of it.
In my project, I needed to carry out serial communication between arduino and MATLAB (GUI). In order to see/verify the output(type) of MATLAB (GUI) serial data, I used HYPERTERMINAL and also VIRTUAL SERIAL PORT EMULATOR. I noticed that every time when when hyperterminal is running or VSPE is running while my serial monitor is on it screws up the uploading feature of the program. I'm not sure if it's because of the VSPE or HYPERTERMINAL, but reinstalling the IDE worked for me.

One of the Serial Control lines, I think it is DTR, is used to reset the Arduino. When you try to program your Arduino, your terminal program could be interfering.

This worked for me only when I also deleted my Arduino Library folder, which contains all settings and extra libs.

For people using Linux Mint I found that by selecting the "TTY SO" port instead of the one labeled "Arduino" it would work (I can't tell you exactly because I don't have that computer in front of me right now).
Then the next time I used the Arduino I again got the same message so I switched back to the "Arduino" port and it has worked that way ever since.
I am not as technically knowledgeable as the rest of you guys so I have no idea why this works or what the problem was, but it worked which is all I care about.  Maybe this will be useful to someone.

I uninstalled the IDE and drivers etc, installed it all again, then I ran the Arduino IDE as an administrator and set to run compatibility as windows 7 (I'm currently using 10).
I also changed the programmer to AVR ISP (I don't think this matters, but I changed it anyway).
All is working again... hopefully, this can help someone else out too.

I had a similar issue with my Uno board
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x90

Tried many methods

Press reset before sending packets
different IDE versions
Change cable
Change controller itself
Loopback test

but all of the above failed.
I use Ubuntu 16.04.4 LTS 4.15.0-33-generic (while writing this comment). The CDC ACM module was not loaded, therefore no /dev/ttyACM0 device was created to select in Arduino IDE -> Tools -> Port
Therefore,
Get the module name and load it
$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 2341:0043 Arduino SA Uno R3 (CDC ACM)
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

$ sudo modprobe cdc-acm

The above command will insert the required module.
Now i'm able to select the right port and upload the code
Out of various solutions this worked for me, hope this helps someone too.

An unusual one but I've been swapping out the microcontrollers a lot and i got this error when one wasn't seated correctly.. i was able to burn a few times but i guess it slipped back out - a little push on the back of the ATMega328 fixed it!

I had this error come up too. It was the first time using a new Arduino Nano board after I had soldered on headers. Just tyring the Blink Sketch, nothing was connected to the board.
I found a tiny short of solder between the GROUND and RESET pins. I picked it off and then I could upload ok.
I suppose this might happen if you had the same short on a circuit somewhere.

There is also the possibility of the the controller itself being placed the wrong way in the socket on the Arduino. This can be dangerous for the controller (which may get zapped) but, in my case, it only gave the out of sync error, preventing me from uploading code.
So just check if the notch on the IC is in the right direction (you can cross check with images of board online). The notch on the Uno's controller should point towards edge of board.

Just had this same error with a brand new Mini Pro.  Since the default blink program that came preloaded with most Arduino is running, I know that the unit is probably OK.
So I inspected the headers I just soldered one more time, and found that there was not enough solder on the TX0 pins.  After re-soldering every works.

I solved it by updating the boards (under "board manager")

Do you have an Arduino Nano?

After lots of unplugging, checking ports, restarting IDE, etc. The ting which seemed to make a difference fixing this fault with Arduino Mega 2560 was to uninstall the windows USB arduino driver then reinstall it usig the driver here & select manually from the list>com ports>arduino
http://drivers.softpedia.com/get/Other-DRIVERS-TOOLS/Others/Arduino-Mega-2560-USB-Driver-1110-for-Windows-7-64-bit.shtml
I may have tested it on my uno then back to the mega so there's a small chance talking to the uno made AVRDUDE happy but unlikely.

When I get a problem uploading to my boards I upload a different program like the blink example.  This seems to reset something and I am then able to upload my own program (which is quite large).
It might be worth trying this to see if it works in your case, although I have no idea why it works.

what board and bootloader?

Arduino Nano, ATMega328P (not 3rd party).  Hardware Version: 2, Firmware Version: 1.16, device signature is 0x1e950f
I have not checked the bootloader, but they are advertised as the "traditional bootloader"

so your answer is specific for old Nano bootloader

Thanks!  I will look at bootloaders and try to upgrade it.  Do you have any info on this bug?

I faced the same problem for some code today and I solved it as follows:
1- First I ran  a basic LED blinking code. It gave the same error. It confirms that  the error is in uploading  and has nothing to do with compiling. I also checked my code was compiling fine.
2- I took another board, but it was working fine on this PC. That  means computer and the USB wire is OK.
3- I connected the faulty board to another PC, and surprisingly, there was no such error in uploading. That gave me hint about issues in driver in the first PC.
4- So I uninstalled the driver and re-installed it on the first PC by downloading from here
( make sure that while installing the driver from this link, you keep your board  connected to the PC)
It worked fine now :-)

I had this error in my Linux Mint 17.3 laptop with Arduino Nano
avrdude: stk500_getsync(): not in sync: resp=0x00
Solved:

removed all that had 'arduino' or 'avr' in its name
removed directories .arduino and .arduino15 (Note the dot in the name)
removed ver 1.8.7 with uninstall of the packet
apt-get install arduino (ver 1.1.0)
tested with a simple sketch (everything OK)
installed ver 1.8.7 with the install of the packet
compiled.
selected ATmega328p(Old bootloader) for processor, Arduino Nano for card and /dev/ttyUSB0 for port
=> IT WORKS !

It seems that the 'Old bootloader' was the trick in this case.
I have now both ver 1.1.0 an 1.8.7, who cares.

you should first read the answer from aguadopd

What I tried was to not connect one Ground of one board to the other ground on the other board. This stopped the problem for me.

If you use arduino-cli and a Arduino Nano clone, you can change the bootloader to the old one, as said in other answers, by using the following command to upload to the Arduino:
arduino-cli upload -v -p /dev/ttyUSB0 --fqbn arduino:avr:nano:cpu=atmega328old program_name

Explanation:

command
explanation

arduino-cli
call arduino-cli

-v
Use verbose output

-p /dev/ttyUSB0
The port, use arduino-cli board list to find the right port

--fqbn arduino:avr:nano:cpu=atmega328old
Use avr board library, nano board and the Atmega328 CPU with the old bootloader

program_name
Replace this with the name of the program you want to upload


text:
Why Arduino Severino (S3V3) sometimes needs reseting when uploading a sketch?
I have an original Arduino UNO R3 that I bought and an Arduino Severino (S3V3) that I've built.
I have no problems uploading sketches to the UNO, but sometimes, when uploading to the Severino board, I have to hard reset it at a specific time during the upload process, when the IDE says something like this below:
avrdude: Version 5.11, compiled on Sep  2 2011 at 19:38:36
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "C:\arduino-1.0.3\hardware/tools/avr/etc/avrdude.conf"

         Using Port                    : \\.\COM1
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]

If I don't reset it when one of the Send messages are being displayed, I get the not in sync message, as below:
avrdude: Recv:
avrdude: stk500_getsync(): not in sync: resp=0x00

Other times, if I'm lucky, I can upload to the Severino board without having to reset it.
So, my questions are:

Why does that happen? Why Severino needs a hard reset during upload?
Why is the problem intermitent? Why does it happen sometimes and others it doesn't?
How can I fix that problem? Is there a simple change to the Severino design that would fix that?

Why does that happen?
When the serial port is opened by either monitor, avrdude or other it toggles the DTR pin of the serial port. Which in turn is AC coupled through C4 100nF. This toggling is converted to a up and down pulse on the ATmega(CPU)'s RESET pin. The subsequent reset starts initially with the boot loader, which typically in turn waits for a avrdude's semiphore (e.i. Send: 0 [30]   [20] ) and if seen then responds in turn and if not seen after a timeout period (typically 5s) it continues on with the application in flash space.
You behavior is describing either; not hearing the response. Or the reset is not getting triggered. Since it does work some times I suspect its prior, but the later.
Why Severino needs a hard reset during upload?
This statement further supports the later.
Why is the problem intermitent?
the pulse is almost long and strong enough, where the DTR toggle is in code and likely has some significant inconsistency.
How can I fix that problem?
Yes, change the value of C4 100nF and or R11 10K, to better pass the toggle. I could derive some EE explanation of what value to pick. But I would suggest some trial and error.
It should also have 5V clamping, as the RS232 levels can reach +/-12V (typically +/-9V) where the AC coupling prevents the DC and burn out. but the AC will stress it.

Is there a way to confirm what the problem is with a scope? maybe setting it to a single run during an upload? If so, what signals should I watch?

start with scoping the reset pin into the ATmega, and make sure it is below the minimum voltage for longer then the minimum specified time, as per the data sheet.


text:
Custom Arduino board beeps and process freezes while I'm uploading a sketch to it. Why?
The strangest thing is happening to a standalone Arduino board that I designed and built. The board (whose schematics are below) has the following features:

It has a ATmega328P with a 5V voltage regulator and usual circuitry when set up as a standalone controller.
It controls a scoreboard with several 7-display digits linked through the connectors on the right (JP1 through JP12).
It has cursor buttons decoded using a voltage ladder through ANALOG_0 (A0).
It has a Real Time Clock to keep time when it's turned off.
It has an RF receiver module.
It has a UART header (JP17) so I can program the board using a serial port.
It has a speaker attached to digital pin 3 (D3).

I upload sketches to it using a RS232-to-TTL adapter that I've also built (schematics also below) and a Serial-to-USB cable. When programming it, the board behaves much like a Severino board.

What's strange is that, when I upload a sketch, the process is paused in the middle and then the speaker starts to beep continually. It pauses with the following avrdude messages:
avrdude: Version 5.11, compiled on Sep  2 2011 at 19:38:36
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch
     System wide configuration file is "C:\arduino-1.0.3\hardware/tools/avr/etc/avrdude.conf"

     Using Port                    : \\.\COM1
     Using Programmer              : arduino
     Overriding Baud Rate          : 115200

When I press reset on the board, avrdude continues outputting its messages (such as below), the beep stops, the upload continues and the sketch is uploaded successfully to the board.
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
... messages and upload continue and completes successfully.

I don't have the rest of the messages handy here, but I hope you get the idea.
So, my questions are:

What is making the upload process pause?
Why is the buzzer beeping when the process pauses?

In the IDE's preferences turn on the Verbose for upload. This log should provide some insight, or more clues.

Is JP4 (auto reset) closed on your serial converter board? Arduinos that don't have that luxury stop until you reset them, then they upload the sketch. As for the beeping, I have no idea.

Did you try to add a diode in parallel to your SP1? A Speaker is just like a motor: induction can trigger reverse currents, adding a diode is a way to protect it. Also driving a speaker directly from a pin (no current amplification with eg a transistor) may be a problem for your board.

Stupid question: Have you programmed the ATmega328p with a bootloader?

@TheDoctor - Yes, JP4 (auto reset) is always closed.

@jfpoilpret - I thought the buzzer induction may have something to do with the beeping. I'll try and put a diode in. Also, it's not a speaker as marked in the schematics, it's just a small 5V buzzer. I copied the idea of driving it from a digital pin from some shield out there...

@TheDoctor - Yes, I have uploaded a bootloader to the MCU. It get sketches uploaded ok if I put it in an UNO board. And the upload works ok in this board, too, except for the beeping and the pause (but it doesn't time out, which is kinda nice).

@mpflaga - The verbose option is on for upload. I'll try and check where exactly the problem happens in the upload process, but I'm pretty sure is when avrdude is trying to send the code to the board. It says Send three times and then pauses. In a Severino board I have, when auto-reset fails, usually at the same point where the Send message appears, avrdude times out and gives the out of sync message and quits. With this board, it just hangs there until I reset it.

"works perfectly in a UNO" -That is useful info. So your board must have a socket. If so - You can determine the source more specifically with a quick experiment. For each of the IO pins bend the pin out, as not to make contact. Floating! As you insert the IC into your socket. Eventually, with all pins floating your circuit will be out of the question. And as some point between the delay/beep should stop. And report back.

@mpflaga All my boards have sockets! I could not even think about soldering my ATmegas directly to the boards! Also, I wouldn't bend any pins on the poor things... that would be like torturing them. Seriously now, that's a good idea. I'll try it out if I'm brave enough.

@jfpoilpret if the speaker is in fact a buzzer (piezo), then there's no induction, hence no diode needed. Forget my original comment.

@Ricardo copying the full output of avrdude during upload might help find possible answer leads.

One friend of mine who did a lot of electronics in his youth once told me: "if it does not work as you would expect, add a decoupling capacitor". On many occasions, I have followed this advice with great success! In your schematic, it's not clear to me, though, where you could add a decoupling capacity. Have you tried in // with the buzzer? You may also try 2 (one for low freqs, one for high freqs): one electrolytic at least 1uF, one ceramic 100nF. At worst, it won't have any effect :-)

What is making the upload process pause?

Well, given all the comments made under your question, this is definitely a tricky one. You might want to try to add a decoupling capacitor as suggested by @jfpoilpret, though your schematics look alright to me… (maybe ask a review of it on EE SE).
I'd also advice you to copy the avrdude command from Arduino IDE output (you'll find it at the top), and run it in the command shell with lower bitrate:
avrdude -v -v -v -v -C "C:\arduino-1.0.3\hardware/tools/avr/etc/avrdude.conf" -P COM1 -patmega328 -U… -B3 -b115200

the higher the -B value is the lower your bitrate is. and -b to the correct baudrate for your bootloader (are you sure this is 115200? it's more common to see 57600).
Did you also set fuses correctly? You might as well want to check the values of the fuses to see if the clocks are correctly set up:
avrdude -U lfuse:r:-:i -U hfuse:r:-:i -U efuse:r:-:i

which will output the values of the fuses. Then to make the values readable, put the values at the bottom of the form on the fuse calculator site, after choosing the Atmega328P MCU from the dropdown list.
Double check that:

you have enough size for the bootloader (usually the more you give it the better it is) ;
you have correctly set up the cristals configuration for your design (which may not be compatible with default Uno settings as setup by the Arduino IDE), checking if you correctly set up the external crystal at 16MHz…

Why is the buzzer beeping when the process pauses?

It's because when the processor does not have the output set up, the values within the registers are in an undefined and unpredictable state. Which means that usually it keeps the last value it had before a reset, or changed state because of some electrostatic weirdness, or is giving some weird PWM output because of the influence of a clock nearby.
So basically, there's something wrong happening when you're uploading your code and that wrong thing has an indirect effect on the audio. I wouldn't worry much about that stuff, but more about the cause of the pausing.
Sadly, I don't have a direct answer for you, but at best a few paths you should investigate more. HTH

+1 Thanks for the hints! Very useful. I'll try them all and report back in a couple of days.

Just wanted to let you know that I fixed the problem. See my answer to this question. Thanks anyway!

I finally found what was causing the problem: the reset signal from pin 4 (DTR - Data Terminal Ready) on the DB9-Female connector was spiking up to 10V before going to 0V and was triggering high-voltage programming on the ATmega. Below is a scope shot showing the situation:

The yellow trace is DTR signal while the green trace is the RESET signal on the ATmega.
According to Atmel's Atmel AVR042: AVR Hardware Design Considerations application note, one should add an ESD diode between ATmega's RESET and Vcc to prevent the reset signal from triggering high-voltage programming mode, like so:

After adding such a small signal diode (1N4148) like the app note recommended, I got the issue fixed. See below the scope shot taken after the diode was added.

Now the 10V peak is gone.
That was a tricky one!! But I could never find what was wrong without research and the right tools. Money on a scope is money well spent!!

This comes about because your reset line does not have the sort of level translator applied to the serial data line.  Most use a level translator ic and run the reset through a channel of that.

@Chris - Yeah, I remember you telling me to use the 2nd MAX232 converter to fix that. I'll take another look and see if I can fix that design. Thanks!!

I'm not sure but the problem may also be related to the auto-reset feature of the converter board.
I copied the converter board design from the Arduino Severino and according to its manual, the serial communication must be set to 19,200 bps for the auto-reset feature to work.

Be sure that computer COM Port speed is set to 19200bps otherwise
  auto reset will not work properly.

Well, I'm using 115,200, so that must be a problem.


text:
How do I get an accurate time?
I've made a clock using an Arduino, but the time seems to drift.  I am aware of the rollover issue; the clock seems to drift by about 15 minutes over the course of a week.
I'm using a custom PCB with this resonator from Digi-key.  The code reads the millis() function at the beginning of each loop, and works from that value.
My question is:  How can I measure time with an Arduino, accurately enough to make a passable desk clock?

The millisecond function is supplied with data from an interrupt, which takes a couple clock cycles to run. This adds a miniscule amount of time to each tick.

@TheDoctor: This is incorrect. The interrupt does not slow down the hardware timer that drives millis().

Note: although my answer was accepted and has a higher vote score, make sure you read Edgar Bonet's great answer on how to make your Arduino keep time without an RTC.
I've been quite successful in using the DS1307 Real Time Clock. Here's a link to its datasheet.
Below are some of its features:

It uses IC interface for communication with Arduino, making it easy to program using the right libraries (available on the Net).
It is connected to Arduino through the SCL and SDA pins (analog A4 and A5 respectively), thus only using 2 pins.
It requires very little external components to run.
IT can be connected to a coin cell battery so it will keep time even while the Arduino is turned off. In its low power mode, the coin cell battery lasts for years.
It drifts very little (in my case it only drifts a few seconds per week).
It's not very expensive.

If you don't intend to use an RTC, you can replace the crystal that is commonly used to provide clock to arduino for a crystal oscillator module like this one from Farnel or this other one. They come in 4 pin packages like in the images below. They will generate a much more precise clock for your arduino.

Both modules mentioned have tolerances of 50 ppm and operate at 5V.
Again, just to be clear, these crystal oscillator modules are not to be confused with regular 2 pin crystal like this below. Those are part of the circuitry of external clocks for MCUs, for example.

Is the DS1302 good enough or should I move to the DS1307?

You do not need an RTC to build a clock: the ATmega chip has all the
hardware needed to perform the duties of the RTC itself. Here is how:

Get a 32768 Hz watch crystal: either buy it or disassemble an
old clock. These crystals, specifically designed for time keeping,
have an extremely small temperature drift. You would also need one
of those if you wanted to use an RTC chip.
Configure the fuses of your ATmega to run off the 8 MHz RC
oscillator. This will make your millis() function horribly
inaccurate, and also free the XTAL1 and XTAL2 pins.
Connect the watch crystal to the TOSC1 and TOSC2 pins. These are the
same pins as XTAL1 and XTAL2 (9 and 10 on the 328P). The different
names are used to mean different functions.
Configure the Timer/Counter 2 for asynchronous operation, normal
counting mode, prescaler set to 128, and enable the timer overflow
interrupt.

Now you will get a TIMER2_OVF interrupt at a very steady rate of once
per second. You only need to advance the clock display by one second in
the ISR. In between the interrupts, you can put the MCU in very deep
sleep (power-save sleep mode: nothing runs but Timer/Counter 2) and run
for years on a couple of AA cells. Unless the display is power-hungry,
obviously.
I did exactly this to build my 24-hour one handed wall
clock.
This link points now to the English translation of the original
documentation in French.
Quartz calibration
If you do not calibrate your quartz, you can expect a significant drift,
typically a few seconds per week. The drift rate depends on the
stray capacitance of the traces that connect the crystal to the MCU. In
principle, it could be removed by adding some extra, finely tuned
capacitance. It is worth noting that you would have the same drift
problem with an RTC.
If you are satisfied with this kind of accuracy, then live with it and
be happy. However, if you care to measure the drift, you will notice
that it is very stable. You can then easily compensate for it in
software, and achieve an accuracy of a few seconds per year.
The algorithm for correcting the drift is very simple. From the measured
drift, you figure out the precise delay between the interrupts, which
should be very close to 109 nanoseconds, then:
#define ONE_SECOND    1000000000  // in nanoseconds
#define ONE_INTERRUPT  999993482  // for example

ISR(TIMER2_OVF_vect)
{
    static uint32_t unaccounted_time;

    unaccounted_time += ONE_INTERRUPT;
    while (unaccounted_time >= ONE_SECOND) {
        advance_display_by_one_second();
        unaccounted_time -= ONE_SECOND;
    }
}

In the above example, the quartz is slightly too fast, and the software
compensates by “missing” a tick every few days. If the quartz was too
slow, the same code would instead double-tick once every few days.
This kind of calibration could also be done for an RTC, but it would be
significantly more complex because the RTC reports the time in a
broken-down form that does not naturally lend itself to arithmetic
operations.

Wow that's a really slick design!  I really like how you've put up enough photos to make the design clear, even for us silly monoglot americans :)  I really love seeing explicit project documentation like this!

@JohnWalthour: Thanks! Now you are encouraging me to write a translation. :-)

@JohnWalthour: Done! The link now points to the English translation.

Just to be clear, when you say, "ATmega chip has all the hardware needed", that isn't entirely true when you have to obtain a new crystal.  I think  your solution is slick and am not above replacing the crystal but I was a bit confused when you say I don't need hardware and then turn around and say I need to replace a piece of hardware.

@KellyS.French: My sentence was “the ATmega chip has all the hardware needed to perform the duties of the RTC itself” (emphasis added). But then it is important to notice that most RTCs, including the ubiquitous DS1307, need an external crystal to operate. The ATmega is no different: it has all that's needed to replace the RTC itself, but not to replace the crystal that you would have to connect to the RTC anyway. Please note that an RTC module is more than just an RTC, as it does include the crystal.

@EdgarBonet fair enough sir! I hope I did not come across as rude, I was expressing my puzzlement.

The resonator you specified has a 0.3% stability, where the crystal or crystal oscillator (as mentioned by Ricardo) is 50ppm. Many times more stable. Not to even mention the temperature drift of resonator is horrible. Heating by sunlight will change it. Hence a resonator should not be used for keeping time over long periods.
Hence using either a crystal or crystal oscillator will get what you want. Either using it on the ATmega and set the fuses respectively or us one connected to an RTC.

Where 50ppm is 0.005% stability?

I generalize on that spec, to keep answer brief. Note stability aside Res. have a much larger tolerance and can be quite off. As John W is experiencing. "the right part for the right job"

Oh, I was just curious about terminology @mpflaga ... new to me.

If you don't want to use extra hardware like an Real Time Clock (eg. DSDS1307), you can significantly improve timing accuracy by disabling all unused interrupts. By default Arduino sketches come with various interrupt routines enabled and often they are not used for actually your sketch. Quickest way to find out if you can do without it to try and disable them by issuing noInterrupts();

−1 (although this deserves −4) because: 1. Unless you actually need them, all interrupts are disabled by default, with the sole exception of TIMER0_OVF, which is needed for time keeping. 2. The timing accuracy of the Arduinos is limited mainly by the quality of the resonator. 3. Interrupts do no affect the accuracy of millis() unless you manage to spend more than one millisecond at a time servicing them, in which case you have other problems... 4. Disabling interrupts with noInterrupts() will prevent millis() from keeping time at all!

I understand a lot of the spirit with Arduino is being frugal and occasionally trudging through a problem. I use Arduino (and now chipKIT, since it's got 10x the RAM and 10x the clock speed) for my workplace and I need "peripheral functions" to be up to speed and working as quickly as possible.
I use the sparkfun real time clock in one of my projects and am very happy with it. They also have a "Dead on" variant.


text:
How to pause Arduino for 1 millisecond through MATLAB?
I have been able to connect MATLAB to my Uno with this line of code: a = arduino('COM4'); through this package: Matlab support package for Arduino.
Right now, MATLAB is my main script that will synchronize all the components [like the Arduino].
I am able to send pulses to my stepper-motor just by using:
void loop() {
    digitalWrite(2, HIGH);
    delay(1);
    digitalWrite(2, LOW);
    delay(1);
}

This works fine, and will make the motor move about once every 2 milliseconds. My problem is that I cannot find a way to produce this same delay through MATLAB's interface. I do know that MATLAB has a pause() function, but when I set up a loop in MATLAB like this:
a = arduino('COM4');
for m = 1:400
    a.digitalWrite(2, 1);
    pause(0.001);
    a.digitalWrite(2, 0);
    pause(0.001);
end

Each step takes WAY longer - about 200 milliseconds each.
What are other options for creating the pause between digital High / Low being sent to the Arduino? It would be nice if I could control the outcome from Matlab, through Arduino.

It sounds like you need something like GRBL. It's a stand-alone program for an arduino board that interprets a command language, and produces coordinated stepper motor motions. It's largely intended for CNC machining, but it can probably do what you need.

The increased in observed delay is due to the time it takes to send the command from MATLAB to the Arduino have its code execute the requested command. In your case the a.digitalWrite. So actual time between pulses using MATLAB's delay is 0.001 pause plus the time of baud rate times the packet size and decoding then execution.
I would recommend not pursuing this solution of the MATLAB controlling the timing of Step Motors, remotely. As this latent coupling will be a frustrating limitation. Noting that for step motors the timing can not afford such latent execution. Hence all the 3D printers and many CNC with Step Motors use Arduino's which get G-Code (motor move commands with destinations) and the Real-time firmware handles the stepping, within tolerances.
I would suggest using something like grbl firmware with step motor shield and then have the MATLAB send the needed G-code. Where there are others with much more features but tailored to 3d Printing. grbl is simpler and straight to the point of moving motors.

It's not clear from your question whether you are trying to get real-time execution without latency or simply want to adjust the motor delay time from MATLAB.  If the latter, a good way is to send delay data (e.g. a number that represents how long you want between pulses) vie serial, which your Arduino program will receive and update the motor delay as desired.  Or, bearing in mind RAM limitations, you can send a whole sequence of delays that can run one after another with precise timing.


text:
Post Data To a Web Service From Arduino
If you want to submit sensor data such as temperature to a remote server/database somewhere you need to use some kind of call to a web server since it isn't possible to connect directly to a database from the Arduino.
How do you post data to a JSON web service from an Arduino that's connected to the Internet?

What web service are you using?

It will be one I write.

There is the aJson library that allows you to work with JSON objects in Arduino.
However, depending on the complexity of your program, I would just do it manually to save memory. You may be able to just copy the functions you want out of the library.
Then check out the WebClient library which has an example for making a POST request at the bottom.

Check this from Arduino docs.
In the "Post method request" code example just define your JSON as plain text like char jsonData[] = "{name: 'yourName', data: 'yourData'}" for example, and then call byte postPage(char* domainBuffer,int thisPort,char* page,char* thisData) function passing "jsonData" variable defined before for "thisData" parameter.
It worked for me, hope it helps.


text:
Is there a preprocessor constant for memory size
I would like my compiles to exclude some code depending upon the flash/program space available. To be used in the demo code of a library I support. Whereas my current solution is to use a #ifdef of processor type. But I would like to be more general and not have to specify all the various chips. Rather it would be nice if there was a pre-processor constant that stated the available size.
Where I am not fluent enough in gcc and or avr-gcc I might expect to find some constants similar those that define the beginning and end of the heap.
On case example. Is that both the UNO and Leo have 32K of Flash. But the Leo's core library uses 4K for USB support, resulting in only 28K available. My Library's demo is near max'ed out on the UNO and I would like to automatically trim out based on available program space.

I've seen programs that do this, but I can't find any

Find the io__.h file for your microcontroller, on Linux it is located in /usr/lib/avr/include/avr, on Windows it will be in a somewhat similar location.
Scroll down to the part that says /* Constants */. There are couple interesting macros defined there, FLASHEND being the one you should be interested in. You can use it for example as follows:
#if FLASHEND > 0x8000
/* Include some extra code when sufficient flash is available. */

#endif


text:
How do I communicate with the Uno using R through RStudio?
I am working on a real time application which is recording sensor data continuously. I need to process the data in realtime using R. Is there a way to connect and communicate with the uno board through RStudio via serial port?

This question appears to be off-topic because it is about a serial interface for R; Best bet would be for this to be migrated to SO.

@MatthewG. Side Note: Migration paths don't exist for private betas.

Ahh, good point.

If RStudio has serial support. Yes, it can talk to a Uno. If it does not. No.
This is really a question about RStudio (and actually just pure R), not arduinos.
Furthermore, RStudio is just an IDE. Therefore, no, RStudio can not communicate with an arduino, compile a program, or do much of all aside from edit source-code files. RStudio does not run your code at all. It uses an external interpreter to run your source files.
R, on the other hand probably can talk to serial interfaces. The fact that you're using RStudio is entirely irrelevant.
I'm not familliar with R, but a little googling leads me to think that R can talk to serial interfaces without too much trouble, though I have not been able to find any information about doing so on windows. What platform are you using?

I can't seem to figure out directly how to read from a serial port using R; While there does seem to have been at least one attempt to provide this, it's not clear that it ever graduated to something supported or easily installable.
Having said that, R does have read.socket and write.socket, which I believe would make it easy enough to use through ser2net, which exposes a serial-port as a socket.


text:
Arduino Uno R2 and Ethernet Shield R3 compatibility
I bought an Ethernet Shield R3 for my Arduino Uno R2, but since R3 has extra pins it does not fit. Can I use the shield? Should I cut off the extra pins. What do I need to do to make it work?

@AsheeshR These extra pins get in the way when putting the shield on the Arduino. If I cut them off it would fit. Should I cut them off?

Which pins are interfering? I dont have the shield, but from what I can make out, the extra pins on the shield do not seem to be areas where there would be any conflict.

The only issue that may create an incompatibility seems to be the IOREF pin next the 5V output pin which is extra on Revision 3 but not in Revision 2.
However, I just had a look at the board schematics and the shield does not use IOREF.

Pin 2 is extending IOREF
So, the shield should work correctly with the Uno Revision 2. As far as the extra pins are concerned, I would recommend not damaging them in any way. If you absolutely need to, then just try to bend them outwards very carefully.

The extra pins do not matter. Just leave them. If you really want, cut them off, but this will remove some compatibility with other products.
They should hang off the ends of the headers closest to the power/USB end of the board.


text:
What are the other IDEs for Arduino?
The basic Arduino IDE lacks a lot of the sophistication present in other IDEs such as code completion, code collapsing, folder organisation, etc. Are there other IDEs that allow programming in C or C++ and improve on these aspects?

Suggestion: Can this question be extended for different languages (not just different IDEs)?

What do you mean @anorton

@anorton That would make for a different question entirely.

anorton probably meant that one could be interested in knowing also what programming languages, other than C++, can be used to program an Arduino. Right, @anorton?

@Ricardo That is correct.   But, I agree that this question should be kept strictly different IDEs.  :)

@anorton I agree. The language one is a separate question.

The Arduino IDE does include code-folding. It is not enabled by default though. Edit "preferences.txt" at the line: editor.code_folding=false and make it true. That's not meant to detract from the question though.

There is an Arduino Eclipse plugin named sloeber! And Eclipse is an awesome cross-platform open-source IDE!
Stino is good. It requires Sublime Text 2 which has an indefinite free trial.
Visual Micro provides a full build system with debugger for Arduino in Microsoft Visual Studio. For advanced users it also allows the underlying Arduino source code to be viewed or modified, enabled projects and/or libraries to be edited from any location and shared in multiple projects alongside true cross-platform intellisense.
For more go to The Official Arduino Site
For development on Windows, there is a special edition from Arduino official IDE called arduino-erw, This edition much better the last one because it fixed a lot of lagging and stability issues!

And NetBeans too!

@Jean-ChristopheDuperron Thanks! I will definitely use the NetBeans plugin. Thanks Hardik Thaker I don't like using Eclipse but if the NetBeans one fails I will use the Eclipse plugin

How is Stino? I love Sublime and was wondering if Stino is any better than the Arduino IDE (especially in terms on connection and serial overflow errors/crashes).

@FakeName I appreciate your enthusiasm, but you will want to tweak your language down just a tad ;-)

I use the Arduino Eclipse plugin and I'm happy with it. But I'll take a look at the other proposals which I was not aware of!

@ChrisO - Why? I have yet to ever hear a convincing argument for censorship.

@FakeName, Just installed it. Hopefully everything goes well tomorrow while working on some mouse tracking for our robot

@FakeName I'm not going to argue for/against censorship (whatever that is).  StackExchange is about professionalism, but in practical terms, it's the community that decides:  if no one flags your post/comment as offensive, then it's alright as is, eh?

@ChrisO - I think this XKCD adequately sums up my opinion on the topic.

@FakeName Hahaha, brilliant thanks for the link, going to the printer, right now ;-)  Wow, instantaneous workplace morale improvement...

Do Eclipse or Visual Studio have features like method tracing (e.g. CTRL-Click leads to the other unit being called by a users method) and context help for C++? (sorry if that's a real newbie question)

@Hamish_Fernsby, yes, Eclipse does this incredibly well. See my setup documentation here: https://arduino.stackexchange.com/a/75491/7727. It makes navigating the code sooo much easier, enabling one to really dig into the core and libraries.

First link (to Eclipse) goes to a spam website.

Expanding on Fake Name's answer, there is also Visual Micro's Arduino plugin for Atmel Studio (built off Visual Studio). It shares the tools, sources and libraries with the Arduino IDE but provides all the code completion and other features of Visual Studio.
The Visual Micro plugin also works in all versions of Visual Studio. Provides
Arduino usb debugging and an Arduino IDE compatible Board Manager.

AtmelStudio is ponderous and a bit quirky -- as many Microsoft creations -- but powerful and ultimately very useful.  I've completed three projects for the Due and find it very facile.  Recommend the J-Link emulator by Segger.

vim can be used for Arduino development, but it will take some configuration (as is the way of vim). You'll need the syntax file and this plugin that enables you to compile and deploy from vim.
Grant Lucas produced a great write-up on getting your environment situation squared away:

Using Vim for Arduino development
Here's a quick post on setting up Vim for Arduino development instead
  of using the Arduino IDE. If you're a heavy Vim user, it can be a bit
  of a shock to go into a different editor. Thankfully the setup is
  pretty easy to get this all working with Vim. This post is assuming
  you are comfortable with how Vim is setup and ideally already have an
  environment that works for you.
Install the Arduino IDE
Wait. What?!? I hear you say. I know, I know. We're not actually using the Arduino IDE but we need it for some configuration and the
  files it installs. The Vim plugin we'll be using ties into what the
  IDE installs and configures so it's needed. You can download the IDE
  from the Arduino site.
Install vim-arduino plugin
To get the main goodness of compiling, monitoring and deploying to an
  Arduino, grab the latest version of vim-arduino. Install it in
  your .vim folder using what ever method you use to manage your Vim
  plugins. Hint: I'd recommend Pathogen as it makes installing
  as simple as dropping the plugin folder into a bundle folder.
Vim syntax file
Next up is to get the syntax file so we can have nice colour coding
  for .pde and .ino files. Download the latest arduino.vim and
  install it in your Vim syntax folder. To get the syntax to apply to
  the correct file types add the following to your vimrc file
au BufRead,BufNewFile *.pde set filetype=arduino
au BufRead,BufNewFile *.ino set filetype=arduino

Configuring the Arduino IDE
Before trying to compile and deploy with Vim, get it all working with
  the Arduino IDE first as the Vim plugin just calls from the settings
  saved by the IDE. If it's working in the IDE, it should work in Vim.
  Make sure you select the right tty.usbmodem* serial port from Tools >
  Serial Port in the IDE. Note: This will only show when the Arduino
  is plugged in.
Working from Vim
Once you can communicate with your Arduino from the IDE you should be
  fully good to go with Vim. You shouldn't have to open the IDE unless
  you want some example code. Open up your sketch file in Vim and use
  <Leader>ac to compile a sketch, <Leader>ad to compile and then
  deploy to the connected Arduino and <Leader>as to open a new window
  with screen to monitor the serial output from the Arduino.

I was wondering when a Vim post was going to come up considering Emacs was already present ;-)

@Asheesh gotta represent!

I've just discovered that setting the Arduino IDE preference 'use external editor' puts the IDE into a kind of 'listening' mode that detects changes to the file when editing in Vim (or other editor). You have to have file open in both editors.

You can use AVR Studio to write programs for Arduinos.
There is a plugin that lets you link against and use the arduino libraries from within Atmel Studio.
If you've used Microsoft Visual Studio, Atmel Studio is basically a reskin of Visual studio with different compiler backends that target the ATmega series of devices, so you'll feel right at home.

There is a half way solution as well since the Arduino IDE has support for external a editor, then the Arduio IDE just compiles and uploads.

Now you can use whatever IDE/editor you like to edit the code,
and then you switch back to the Arduino IDE to press the compile and upload button when you are done.

One rather good IDE extension is the Arduino Mode for Emacs. It allows using a highly versatile and extensible IDE such as Emacs for writing, compiling and uploading code to the Arduino.
The documentation and instructions can be found here.

UPDATE->  Codebender is being shut down.
There is a brilliant open source, web based IDE called Codebender
It is like Github for Arduino and has a great community working from it with thousands of examples and the dev team are exceptional.
With codebender, you can:

program an existing sketch to your device
clone an existing sketch
modfy it to your needs
share your work with the world
embed code in your website, blog, or tutorials

Cross-platform
Works on Windows, Mac & Linux, Firefox & Chrome
Codebender supports Windows (from Windows XP up to Windows 8.1, yes, even Vista :P), Mac OS X 10.6-10.9, and Linux and works within all major browsers

How does it manage libraries (and libraries versions) that you would get from variuous locations (e.g. on GitHub)? I ask in relation to these questions: http://arduino.stackexchange.com/questions/362/where-can-i-find-a-central-repository-of-all-available-arduino-libraries and http://arduino.stackexchange.com/questions/348/how-to-organize-my-arduino-projects-structure-for-easy-source-control

A note provided by Sean808080: UPDATE->  Codebender is being shut down.

Majenko created and maintains UECIDE. His contributions are pretty epic; I've seen first hand his coding prowess as we worked together to get the Adafruit 1.8" TFT Joystick shield working on the chipKIT platform.

In addition to the mentioned IDEs you can use Xcode with embedXcode if you use a mac. The IDE has a great file structure and support for a lot of boards. For big and complex projects it is really good. I like to use vim or the arduino IDE for simpler and less complex sketches/projects.

There is one from Brazil called MariaMole: http://dalpix.com/mariamole
According to the author, like the original Arduino environment, the MariaMole facilitates the creation of software for the Arduino. However, while the original Arduino IDE has limitations to make life easier for beginners, MariaMole brings features that more advanced users are accustomed to find in professional IDEs, such as:

Runs over Arduino install
Workspace support multiple projects at the same time
Multiple serial port consoles at the same time
Files use open-formats
Building process configurable
Imports Arduino examples and sketches
Easily import Arduino libraries
Color-themes

Thanks for your answer Daniel. I hope you don't mind though that I removed the image you included of the candy called "Maria Mole". It's not really relevant to the discussion, and it actually made your post look like spam at first glance.

It would be best if some description of the IDE could be added here. At the moment, the answer contains only a link, and if the link were to go down, the answer would become useless.

@AsheeshR, I've put more info as you suggest. Thank you

I have to ask the same question I already asked for another answer: How does it manage libraries (and libraries versions) that you would get from variuous locations (e.g. on GitHub)? I ask in relation to these questions: http://arduino.stackexchange.com/questions/362/where-can-i-find-a-central-repository-of-all-available-arduino-libraries and http://arduino.stackexchange.com/questions/348/how-to-organize-my-arduino-projects-structure-for-easy-source-control

I have always wanted to use Eclipse, since that is our standard (for Java) at work. But I never managed to get the debugger working with my AVR Dragon board - just too many layers between the source code and the chip.
So I am back to using Atmel Studio. You can set the keyboard mapping to emulate various other IDEs (including Eclipse and Netbeans). I can accept the Microsft quirkiness in return for a stable debugging environment, multi-file support and professional source control features.

I have done debugging with the Arduino eclipse plugin (recently renamed to sloeber sloeber.io ) and the zero. I do not own a avrdragon but I know other people got it to work.

PlatformIO
I use GitHub's Atom text editor with the PlatformIO package.
I like both of them:

Atom has various useful built-in features and over 6,000 packages (which can be easily downloaded and installed from the settings pane) allowing the user to add essentially any feature he needs.
PlatformIO is a powerful IDE for microcontroller programming. It has all the features of the Arduino IDE (like the ability to upload code to an Arduino board with one single click, a serial monitor, ...) plus many others (like all those listed by the OP) and perfectly supports Arduino. Besides "it supports more than 200 development boards along with more than 15 development platforms and 10 frameworks". It can be natively installed either on GitHub's Atom either on Microsoft's VSCode code editors.

Edit
I still use PlatformIO on Atom on a regular basis, but I just saw on their website and forum that they are discouraging users from using their Atom package while proposing PlatformIO in VSCode as a better alternative.
The Atom version still works well, but if you are changing your editor and want to try PlatformIO I would suggest to follow their advice and install it in VSCode.

I use Xcode, set up as an external editor. I write everything in libraries, and the sketch simply call the libraries.

Clion + PlatformIO
I personally use Clion which is a cross-platform IDE along with PlatformIO which is a cross platform build system for arduino and alike.
Clion because I love the jet brains IDEs. As a student or teacher you can get a free licence. And I have been told by suspicious people on the internet that there are other ways of obtaining a license (not that I would advice on doing anything like that).
PlatformIO is quite powerful and integrates well into almost any IDE. It's easy to declare dependencies to other libraries which are automatically downloaded.
I am also using the Clion serial port monitor plugin to communicate over Serial.print().
With this setup you can completely ditch the old Arduino IDE which I found to be quite satisfying!

Fritzing

This is the new “Code View”! It lets you write your code directly inside Fritzing, and even upload it from there to your microcontroller. It even has a serial monitor. :)

Normally known as a schematic builder, Fritzing has a built in IDE.
See here for more.

Haven't seen anyone mention it yet, but I use VisualMicro for Microsoft Visual Studio (not Atmel), and I like it just fine. It gives you everything you'd normally have in Visual Studio, like intellisense typing. The trial version is the full program, and the license is pretty cheap- like 30 bucks or something. I got my work to pay for a commercial license key. Do recommend!

Notepad++

set Notepad++: view->folder as work space
and Language->C->C++ sets syntax highlighting
set arduino Ide file->preferences "Use external editor"

and everything runs smoothly, without the bulk of eclipse.

My go-to choice (pun, that's only a pun, folks!) is Sloeber - Eclipse with Jantje's EclipseArduino plugin. Having decades of emacs muscle-memory-training, I use MulgaSoft's Emacs+ plugin with it, switching to real GNU emacs for the heavy lifting - as developing a project and new libraries for it in parallel, f/ex, and use Sloeber to catch my typos & brain-f*ts.

A good alternative to the Arduino IDE is Visual Studio Code in combination with the Microsoft extension for Arduino https://github.com/Microsoft/vscode-arduino
It gives all the features of the Arduino IDE such as
Verify and upload your sketches in Visual Studio Code

Built-in board and library manager
Built-in example list
Built-in serial monitor

but additionally to offers some attractive features:

IntelliSense and syntax highlighting for Arduino sketches
Snippets for sketches
Automatic Arduino project scaffolding

I use Eclipse and Sublime Text for editing Arduino code, and I build in the Arduino IDE with it set to "external editor" mode, or using the Arduino Command Line tools. Eclipse has a fantastic indexer and makes understanding the Arduino core much easier. I've written a detailed PDF about using and setting up Eclipse for professional software development, incl for Arduino, here: https://github.com/ElectricRCAircraftGuy/eRCaGuy_dotfiles/blob/master/eclipse/Eclipse%20setup%20instructions%20on%20a%20new%20Linux%20(or%20other%20OS)%20computer.pdf.
Note that I'm using regular Eclipse for C/C++, with no Arduino plugins. I don't find them that useful since they can never seem to keep up with the latest Arduino build tools anyway.
See my document for full setup information in general.
Related:

C++ vs. The Arduino Language?

after some experience
any editor (atom or vscode) are excellent with platformIO
offering:

syntax highlighting
debugger
easy project (s) manager
(which i like most) collapsible blocks

In late 2019 we have the Deviot Sublime Text 3 plugin that runs on top of PlatformIO.