Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [arduino-uno]

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

79
votes
3answers
67k 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?
34
votes
1answer
129k 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: ...
49
votes
13answers
34k 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 ...
10
votes
1answer
2k 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" ...
4
votes
2answers
4k 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 ...
2
votes
1answer
3k 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?
8
votes
2answers
2k 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 ...
25
votes
7answers
22k 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 ...
50
votes
7answers
107k 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 ...
20
votes
4answers
77k views

What is Serial.begin(9600)?

I know that this is to print something: Serial.begin(9600); But I want to know what it really means?
7
votes
1answer
10k 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 ...
18
votes
1answer
46k 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 ...
17
votes
2answers
4k 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 ...
5
votes
5answers
17k 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 ...
1
vote
1answer
496 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 ...
43
votes
11answers
6k 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 ...
1
vote
2answers
513 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 ...
4
votes
2answers
1k 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()....
2
votes
3answers
248 views

Motor shield leaves no pins accessible

I just bought a motor shield for my UNO, in the pic below: Plugging it into the uno leaves no pins accessible on the board. I’d like to use it to build a robot car, but there’s nowhere to plug in the ...
0
votes
1answer
2k 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 ...
43
votes
2answers
47k 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 ...
26
votes
11answers
124k 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 ...
23
votes
2answers
41k 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 ...
12
votes
4answers
67k 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;...
6
votes
6answers
82k 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 ...
15
votes
1answer
7k 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 ...
8
votes
2answers
3k 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. ...
16
votes
2answers
21k 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 ...
5
votes
2answers
4k 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 ...
4
votes
4answers
15k 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 ...
6
votes
6answers
11k 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 ...
6
votes
2answers
737 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 ...
4
votes
2answers
6k 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 ...
4
votes
2answers
358 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 ...
3
votes
3answers
2k 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 ...
1
vote
2answers
1k 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, ...
1
vote
2answers
2k views

How to read RC receiver channels without using pulsein() command with arduino

I am building a quad-copter, the problem is of stability and for better stability lesser sampling time is required. For lesser sampling time I need to have faster loop() function. But the Pulsein() ...
1
vote
2answers
305 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 ...
1
vote
1answer
2k views

Powering an Arduino with more than 5 V

Last time, when I supplied 12 V from a power supply to the Arduino's 5V pin, it blew up. This time I'm going to use an adapter. Why does an adapter with a 12 V input not blow an Arduino up, ...
35
votes
11answers
118k 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 ...
6
votes
4answers
2k views

How to move from arduino to physical prototype

I've been reading a bit about moving from Arduino to PCB and it seems a bit daunting. For now, all I really want to do is take something I've built, and make a few changes so that I can actually ...
11
votes
4answers
14k 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 ...
4
votes
1answer
34k 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 ...
7
votes
2answers
21k views

How to send numbers to Arduino UNO via Python 3 and the module serial

I am new to Arduino (and computer programming in general), so I apologize if this question looks silly. Once I set up a basic arduino-LED connection, I have problems sending INTEGERS to arduino ...
6
votes
5answers
29k views

Inappropriate ioctl for device

I am using an Arduino Uno and a Mac and trying to upload my code into the board. I tried uploading the program from different computers(MacBook Air and Pro) and I still have this problem. How do I ...
6
votes
2answers
2k views

Male header pins on Arduino Uno

On my board, there are 12 (2 groups of 6, each group consistent of 3 rows of 2 pins) weird male header pins. What are these, and how would you use them?
1
vote
2answers
73 views

How to re-solder the resistor in order to reprogram the Atmega8U2

As I see here I need to reprogram the ATMEGA8u2: https://www.arduino.cc/en/Hacking/DFUProgramming8U2 I need to solder a 10k resistor into a specific place. In a previous attempt I did that and ...
5
votes
1answer
881 views

Why does an LED sometimes flash when increasing brightness?

This is admittedly a cross-post from LED fade malfunction (random flash) but I can't get an answer on the Arduino forum. I was mucking around with some very basic code and I noticed that when ...
4
votes
1answer
206 views

Change Servo Speed With RedBearLabs BLE Shield

I recently got the RedBearLabs BLE shield to use it to control two high spped continuous rotation servos. I have the BLE example sketch loaded and the ios controller app works. The problem is that the ...
3
votes
3answers
12k views

How to clear FIFO buffer on MPU6050?

my MPU6050 works very unstable , the problem is unable clear excessed FIFO buffer on MPU6050, I am using Jeff Rowberg's MPU library and according to his DMP example but without using interruptions,...