78 votes

Arduino Nano uploading gives error: avrdude: stk500_recv(): programmer is not responding

Know this is old but I ran onto it during my search for Nano(V3)'s not uploading so thought might help someone else. Problem is the bootloader - Arduino IDE BUT I Found an easy solution (right under ...
Goofy Brained's user avatar
20 votes
Accepted

What's the difference between all the Software Serial Libraries? Which one is Arduino Nano compatible?

This answer lists the 4 basic choices: HardwareSerial, always the best. Simply use the pre-defined Serial variable. On some Arduinos, there are extra HardwareSerial ports, called Serial1, Serial2, ...
slash-dev's user avatar
  • 2,029
16 votes
Accepted

Using millis() to toggle an LED every 500 milliseconds

if (!(millis() % 500)) ... There are two issues with this. The first, and most obvious, is that the condition will be true for a full millisecond. During that millisecond you will be toggling the LED ...
Edgar Bonet's user avatar
  • 42.3k
15 votes
Accepted

Does ADC conversion to a voltage rely on the actual value of the +5 V pin?

The ADC inside the Arduino does not measure voltage, but rather a voltage ratio. Namely the ratio from the voltage at the analog input to the voltage at the Vref pin. In the default configuration, ...
Edgar Bonet's user avatar
  • 42.3k
14 votes

Arduino nano as HID Keyboard

Get yourself a Arduino Leonardo, Micro or Pro Micro (or Due, Zero, M0). Those can emulate a keyboard. Start with reading the Arduino Keyboard Mouse reference. The Arduino Nano can not use the Arduino ...
Jot's user avatar
  • 3,216
14 votes

Arduino voltage misunderstanding

Imagine that I have 5 flagpoles. I go to each of those flagpoles and raise a flag to a height of 2 meters. Since I have 5 flags, each at a height of 2 meters, does that mean that my flags have a total ...
Tanner Swett's user avatar
13 votes

How to change baudrate of ESP8266 (12e) permanently?

Depending on how recent a version of the AT Instruction Set interpreter your chip has, the two instructions you tried may not be valid ones; they are not listed in Espressif's ESP8266 AT Instruction ...
JRobert's user avatar
  • 15.1k
13 votes
Accepted

How to work with non-traditional UART baud rates

The Arduino Nano cannot do 800 kb/s. As you can see in the source code, the bit duration is rounded to the nearest multiple of 8 CPU cycles. In your case, it is rounded to 3 × 8&...
Edgar Bonet's user avatar
  • 42.3k
12 votes

Arduino Uno versus Arduino Nano power consumption

A Uno which isn't doing anything useful except being turned on will use about 50 mA of current from the power jack at 9V. If you use 3 x alkaline AA batteries (giving a nominal voltage of 4.5V) ...
Nick Gammon's user avatar
  • 37.9k
12 votes
Accepted

Two batteries sharing ground?

Not only can you share the grounds - sharing the grounds is required for there to be any form of meaningful circuit for signals to get around the place. To copy-and-paste a blog post I wrote some time ...
Majenko's user avatar
  • 105k
12 votes
Accepted

Arduino voltage misunderstanding

Every pin gives you 5V on HIGH, yes, but these voltages don't add up. Voltages are always measured between two points. In electronics we are defining one point in our circuit, that we use for all ...
chrisl's user avatar
  • 15.8k
11 votes
Accepted

Why analogue pins affect each other?

This is to be expected. The other pins have nothing connected to it, so their voltage is floating. The Arduino MCU only has a single ADC. To read the different analog pins, it uses a multiplexer to ...
Gerben's user avatar
  • 11.3k
11 votes
Accepted

how fast does loop() run in Arduino

Loop runs as long as loop needs to run. Instructions in a CPU run sequentially. The more instructions there are the longer it takes to run. The more code you put in loop the longer loop will run. ...
Majenko's user avatar
  • 105k
10 votes
Accepted

Turning all LEDs on (FAST.LED)

You can use fill_solid. For example fill_solid( leds, NUM_LEDS, CRGB(50,0,200)); Or fill_solid( leds, NUM_LEDS, CRGB::Red);
Rob Hilken's user avatar
10 votes
Accepted

avrdude ser_open() can't set com-state

Maybe a Windows driver problem. Do your uno and nano use a ch340? (It is the component translating USB to uart (serial pins of atmega328). Windows has no software way to differenciate boards using ...
Bouc's user avatar
  • 192
10 votes
Accepted

Arduino Nano is performing really slowly, even though the calculations are simple and there are no delays

I put in some timing into your code. As a tip for you and others who may want to time code, here is a simple way of doing that ... Timer class Define a timer class as follows: class timer { ...
Nick Gammon's user avatar
  • 37.9k
9 votes
Accepted

Max current of Vin and 5V pin on Arduino Nano

It's hard to say. The maximum the on-board regulator can provide is 800mA. However the actual amount it can provide at any time depends on other external factors - most notably: The voltage of your ...
Majenko's user avatar
  • 105k
9 votes

Does the reset button work when not powered?

The reset on an Arduino does not erase anything. It merely restarts execution of an already uploaded program. Also the AVR needs to be powered on for it to realize whether it has been reset. Every ...
electrophile's user avatar
9 votes

Does ADC conversion to a voltage rely on the actual value of the +5 V pin?

A USB-powered Arduino Nano will have an ADC voltage reference which can't be relied on, due to the +/- 5% tolerance of the incoming USB voltage. On top of that, the Nano has an MBR0520 Schottky diode (...
Enric Blanco's user avatar
  • 2,114
9 votes

Calling I2C functions inside an ISR

Here is an analogy for you to help you understand why using the IRQ is a good idea. Imagine you are at a conference. There's hundreds of you in the audience, and you are in a question and answer ...
Majenko's user avatar
  • 105k
9 votes

Why are the pin numbers of the diagrams and of the code different?

Every chip datasheet (and also the Arduino boards) uses 2 different ways to refer to the pins: Counting the physical pins in the order as they appear on the chosen package of the chip Referring to ...
chrisl's user avatar
  • 15.8k
8 votes
Accepted

Powering up LED strip - How many amps?

Usually strips have not individual LEDs, but are composed of a lot of "pieces" in parallel, and each piece is composed by three leds in series along with a resistor. Usually the strips are composed ...
frarugi87's user avatar
  • 2,721
8 votes

Arduino Nano not visible in Serial Ports (Mac OS)

Is it an original Nano or a clone? The original Nano uses FTDI's FT232 ship, whereas clones use the CG340 USB-to-TTL chip. The former works fine straight away Mac OS Sierra, whereas the latter needs ...
Enric Blanco's user avatar
  • 2,114
8 votes
Accepted

How do you get 2 PWM pins to inversely bitbang at 25 KHz on a Nano?

There are various solutions. I suggest using two PWM channels driven by a single timer. This way you do not have to worry about synchronizing two timers. You can configure the channels identically, ...
Edgar Bonet's user avatar
  • 42.3k
7 votes

Arduino Nano - programmer is not responding

For me the problem was the selected "processor" type. I had to change it to 328p (old bootloader). Also, raise the IDE's verbosity, in order to have a nice progress bar when loading the sketch. My ...
dentex's user avatar
  • 171
7 votes
Accepted

Precision voltmeter using Arduino

A divider is used to (as the name suggests) reduce a higher voltage to a lower voltage. Using a divider on a small voltage will only make it smaller and harder to measure. To get the most out of ...
Majenko's user avatar
  • 105k
7 votes
Accepted

Is there a way to upload precompiled code to an arduino?

Is there a way to compile arduino code without automatically uploading it, so that I can put the pre-compiled binary up for download on a website? Yes, you can save the .hex file produced by the ...
Mikael Patel's user avatar
  • 7,959
7 votes

Arduino minimal power usage

I have a project along those lines. I am reading temperature, humidity, and light level and logging it, with a timestamp, to an SD card. Schematic (click for larger image): Photo: It was designed ...
Nick Gammon's user avatar
  • 37.9k
7 votes
Accepted

No power from Breadboard Power Supply Module

I'm not surprised you can smell burning. You have the power supply connected backwards. You see that little + and - symbol next to the ON/OFF jumper? That's the polarity of the two runs of pins. You ...
Majenko's user avatar
  • 105k
7 votes
Accepted

How to Sort Elements of Array in Arduino Code?

As mentioned in the comments, qsort is a good option: // qsort requires you to create a sort function int sort_desc(const void *cmp1, const void *cmp2) { // Need to cast the void * to int * int a ...
001's user avatar
  • 943

Only top scored, non community-wiki answers of a minimum length are eligible