Questions tagged [arduino-uno]

The Arduino Uno is the most common of the Arduino boards. It is based on the ATmega328P microcontroller.

Filter by
Sorted by
Tagged with
103 votes
3 answers
107k views

Have I bricked my Arduino Uno? Problems with uploading to board

I can't upload sketches to my Arduino Uno. Have I "bricked" it? What steps can I take to work out what is wrong? What can I do to fix it?
  • 36k
66 votes
1 answer
221k views

How do you use SPI on an Arduino?

With reference to the Arduino Uno, Mega2560, Leonardo and similar boards: How does SPI work? How fast is SPI? How do I connect between a master and a slave? How do I make an SPI slave? Please note: ...
  • 36k
14 votes
1 answer
5k views

What happens when code is uploaded using the bootloader?

When I upload a new sketch to my Arduino Uno using the Optiboot bootloader, what really happens? What is sent to the Arduino? How does it respond? What does "not in sync mean"? What is "in sync" ...
  • 36k
62 votes
13 answers
77k views

Is there a way to have more than 14 Output pins on arduino?

Is it possible to have more than 14 output pins on the Arduino, I am working on a project in which I need to light up several LEDs individually. I only have an Arduino Uno, and I don't want to get a ...
  • 1,833
2 votes
1 answer
351 views

Wanted to control 2 servos with serial read [closed]

I want to use 2nd servo only when 1st is in up state by asking user whether he wants to fire or not.(code in bold is not working ) #include <Servo.h> Servo myservo; Servo trigervo; ...
16 votes
1 answer
25k views

How do interrupts work on the Arduino Uno and similar boards?

Please explain how interrupts work on the Arduino Uno and related boards using the ATmega328P processor. Boards such as the: Uno Mini Nano Pro Mini Lilypad In particular please discuss: What to use ...
  • 36k
5 votes
2 answers
7k views

Read RC receiver channels using Interrupt instead of PulseIn

I am designing my own quadcopter control algorithm, whereby I currently read 4 RC receiver channels using PulseIn on each loop in the following manner: ch1_raw = pulseIn(rcPin1, HIGH, 25000); In ...
  • 53
2 votes
1 answer
10k views

Which pins of an Arduino UNO can be used as Tx and Rx pins for connecting to GSM GPRS SIM 900A

I am using Arduino UNO and SIM 900A. Pins 0 and 1 are used as TX and RX. Is it possible to use any other pins?
9 votes
2 answers
3k views

Can the 2nd MCU on the UNO R3 be used for keyboard emulation?

Following on from What's the 2nd ICSP header for in Arduino Uno R3? I was wondering how this could be hacked to our advantage. For example, could that firmware be rewritten to have the UNO ...
  • 1,332
28 votes
7 answers
36k views

How can I get a unique ID for all my Arduino boards?

Once you have uploaded a sketch to one of your Arduino boards, it is hard to know exactly what source code led to that sketch. Indeed, you may change the source code of your sketch on your PC without ...
  • 8,962
22 votes
2 answers
72k views

Reset an Arduino Uno in code

Is it possible to reset an Arduino (i.e., to reboot it) from code (i.e from the sketch itself)? I know that is possible with a special circuit but is there a chance to make it just with code? Below ...
  • 541
0 votes
2 answers
615 views

How to rotate two or more steppers simultaneously by giving ARRAY of angles?

The following is the code that I am trying but the problem is steppers rotate one after each other. However, I want to rotate steppers simultaneously. This code for two stepper motors. int pulse=3; ...
77 votes
9 answers
165k views

How can I create multiple running threads?

Is there a way I can have multiple parts of the program running together without doing multiple things in the same code block? One thread waiting for an external device while also blinking a LED in ...
  • 893
28 votes
3 answers
126k views

What is Serial.begin(9600)?

I know that this is to initialize something: Serial.begin(9600); But I want to know what it really means?
  • 531
5 votes
5 answers
43k views

AT command is not responding on serial monitor

I am trying to send AT commands to ESP8266. I re-flashed ESP8266 http://imgur.com/a/J8Ueh I followed this tutorial http://remotexy.com/en/help/esp8266-firmware-update/ and I hope it re-flashed ...
  • 355
2 votes
3 answers
9k views

Playing Melody with Tone() without using delay()

Is there a method to play a Melody with Tone() without using the delay() function? tone(8, melody[thisNote], noteDuration); int pauseBetweenNotes = noteDuration; **delay(pauseBetweenNotes);**
  • 47
18 votes
2 answers
6k views

Should all unused analog input ports be tied to ground for accurate A2D measurements?

I am using the A0 port on my Arduino Uno to read the voltage output from an LM35 temperature sensor. I observed that the reading fluctuates a lot if I leave the remaining analog input ports A1 to A5 ...
  • 326
1 vote
1 answer
977 views

Can external interrupts be OR'd together on the '328 (Uno)?

I'm thinking about how to handle a rotary encoder. I'm planning on using interrupts and would like to use both the 'A' and 'B' phase transitions to generate interrupts. I'm wondering if there is any ...
  • 1,651
51 votes
2 answers
66k views

What happens if I power the Arduino with both the USB and external power voltage simultaneously?

I am a new Arduino user. I am not sure whether I can connect both USB and external supply through power adaptor to Arduino simultaneously. Would this burn the controller? Basically, I want to ...
  • 523
48 votes
11 answers
12k views

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 ...
  • 792
47 votes
11 answers
150k views

Mac OSX Yosemite no serial ports showing for Uno R3

I have a MacBook Pro running OS X Yosemite (10.10.3). I connected my Arduino UNO R3 to my computer for the first time after the Yosemite upgrade - it worked fine before this! When I opened the ...
  • 571
18 votes
4 answers
28k views

How to get weight data from glass electronic bathroom scale sensors?

I am doing a small project with a bathroom scale but I run into some problems. I am using an Arduino Uno V3, HX711 module amp and a scale. Scale: HX711 amplifier: I disassembled the scale to get ...
10 votes
2 answers
6k views

Does the Arduino Uno have two crystals?

Take a look at this picture: I think most of use agree that the "big silvery" thing on the board (red) is the famous 16 MHz crystal of the Arduino. That's what I've believed until very recently. ...
  • 2,883
8 votes
2 answers
6k views

Arduino interruption (on pin change)

I use the interrupt function to fill an array with values received from digitalRead(). void setup() { Serial.begin(115200); attachInterrupt(0, test_func, CHANGE); } void test_func() { if (...
7 votes
4 answers
32k views

How to add hysteresis to threshold values?

This code compares the analog input value against two thresholds, having three voltage regions. Then it will turn on an LED according to what region the read voltage is in. The problem is that when ...
  • 103
7 votes
3 answers
19k views

Access denied when Uploading

I went to upload my sketch to my Uno (r3), but unusually, the Upload Console returned this error: avrdude: ser_open(): can't open device "\\.\COM4": Access is denied. Just started seeing this, ...
4 votes
2 answers
3k views

Does data coming in on Arduino serial port store for some time?

I am using Arduino Uno and my question is when data is coming on Rx pin and at that time our program is not checking Serial.available() Then after some time the program will check Serial.available()....
3 votes
5 answers
5k views

Fan regulator control from Arduino

I'm trying to control my ~230 V fan from the Arduino. Can anyone say the best possible ways to design a fan regulator that can be controlled by the Arduino using a low cost design.
2 votes
2 answers
2k views

Locking ATmega328 from reading back the hex file

I want to completely block the access to an ATmega328. How do I do this? I have Atmel ICE, AVR studio 7 and Arduino. Bootloader - optiboot_atmega328 Fuses(without lock) - 0x05, 0xDE, 0xFF Steps I ...
1 vote
2 answers
2k views

How to combine two different sensor sketches to one complete sketch?

How to combine two different sensor sketches to one complete sketch for a complete circuit that attaches to one Arduino Uno? Sharp Dust Sensor int measurePin = A0; // Connect dust sensor to Arduino ...
1 vote
1 answer
3k views

Arduino Uno and ESP8266 serial monitor issue

I plugged in the Arduino Uno and the ESP8266 following this schema: When I enter "AT" in the serial monitor, I get an "OK". I can also connect to my wifi using typical ESP8266 commands. What doesn't ...
0 votes
1 answer
105 views

Getting random values on Arduino Duemilanove 328

I am using Arduino Duemilanove 328,and running the AnalogReadSerial example sketch. Even when nothing is connected to the Arduino board it still shows a value of about 350 out of 1023. Ideally it ...
34 votes
12 answers
164k views

How can I connect to an Arduino using WiFi?

I'm working on building a solar powered, Arduino based weather station. The weather station consists of a temperature sensor and a photoresistor, and I plan to add an anemometer in the future. I would ...
  • 938
30 votes
2 answers
65k views

Arduino as USB HID

Is it possible to build a HID device (like a keyboard) using an Arduino uno? At the time being, I have button inputs on the Arduino giving outputs on the serial line. So, how can I transform my ...
18 votes
1 answer
11k views

What's the 2nd ICSP header for in Arduino Uno R3?

Looking at my Arduino Uno R3 board and its reference design schematic I noticed that there's a second ICSP 6-pin header. In the schematic, the connector I'm referring to is named ICSP1. What's that ...
  • 3,310
17 votes
2 answers
26k views

What happens when I call exit() from my program?

In either of setup or loop, if I were to add an exit(0) call, where would control be passed to? What would the next state of the microcontroller be? Would it stop execution and power down? I am using ...
  • 3,697
16 votes
7 answers
127k views

How do I know the sampling frequency?

I am beginning to get a bit confused about sampling rates and baudrates etc. I have this Arduino code: #include <eHealth.h> extern volatile unsigned long timer0_overflow_count; float fanalog0;...
  • 513
12 votes
6 answers
109k views

Send AT commands to ESP8266 from Arduino Uno via a SoftwareSerial port

GOAL From Arduino UNO, send AT commands to ESP8266 via a SoftwareSerial port and receive results. CURRENT STATUS I either send AT commands and get nothing back (wiring scheme 1) or I send AT ...
  • 223
7 votes
5 answers
14k views

Is it possible to press a button from Arduino and my computer will get a key event?

My idea seems easy: I connect a button with arduino, then write some code and upload it to arduino. Then I open the notepad(or any other editor) on my computer. When I press the button, there will ...
  • 183
7 votes
2 answers
57k views

Servo won't stop rotating

I have an Arduino Uno R3 board and after some time not in use it seems to have corrupted. My code is below, basically I want to rotate a servo 90 degrees every 12 hours but as soon as I plug it in the ...
  • 173
7 votes
2 answers
906 views

Using Arduino for simultaneous lighting effects

I am building a computer for my son (me). I'm trying to spark his interest in computer technology, so my idea is to drive multiple case lighting effects with a microprocessor or controller. I went ...
5 votes
3 answers
30k views

How to convert an hex string to an array of bytes?

How to convert the char array to Byte array? I tried every method but it doesn't work. char CardNumber[8] = "B763AB23"; // Length is 8, basically it's in Hex // B7 63 ...
5 votes
3 answers
7k views

Arduino serial port reset in Serial monitor & Python

So am I using an Arduino with a shield to gain some voltage values for an ECG. I am then plotting that data in Python. However whenever I "observe" the serial port, be that through the Arduino serial ...
  • 513
5 votes
1 answer
1k views

cannot convert 'bool' to 'PinStatus' for argument '2' to 'void digitalWrite(pin_size_t, PinStatus) on Arduino Uno Rev 2 Wifi not working

I am a newbie to micro controllers and struggling to figure out how to fix this issue. When using an older Arduino micro controller it works fine, but when I use a new board (Arduino Uno Rev 2 Wifi) ...
  • 61
4 votes
2 answers
11k views

Unstable reading from pushbutton on digital pin

I use the Pin 7 to get the status of a push button. I put 10Kohm R on the - . The status is unstable because arduino says thet I push it but it is not true... int button = 7; ... // var for reading ...
  • 207
3 votes
2 answers
791 views

How to read RPS for fast rotation with status change method in Arduino?

I'm trying to calculate the coming RPS from rotary encoder. I am trying to get it by checking the status with digitalRead. However, I can not get more than 6 RPS. Any solution? I will be obliged for ...
  • 93
3 votes
3 answers
3k views

Uno pin 13 LED mysteriously always ON at 0.14V unless pinMode OUTPUT

I upload a blank sketch: pin 13 LED is on. Why? I connect pin 13 to GND: it turns off until I remove the connection I connect multimeter between pin 13 and GND: measures 0.14V and LED turns off until ...
2 votes
2 answers
23k views

Arduino: Read frequency of input from audio jack

I want to trigger an arduino from a sound from an audio jack from a mobile phone. The audio is a 1 Khz sound that the mobile will play. I want to avoid accidental triggering of the audio by testing ...
  • 187
1 vote
2 answers
738 views

Determining which section of code uses the most flash [duplicate]

I'm running into the 32k flash ceiling of my 328p. The code is pretty compact but I need help making it smaller. Is there an analysis tool (part of avr?) that can tell me which functions take up the ...
  • 35
1 vote
2 answers
3k views

How to code for cascading multiplexers?

I hope I can get some help on how to get this to work. I have multiple Sensors (32 of these) which values I want to read. I am using a master multiplexer HC4051 connected to 4 slave multiplexers, ...
  • 45

1
2 3 4 5
11