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
5
votes
5answers
8k views

OTA updates for Arduino using nRF24L01+

Is it possible to send OTA updates to Arduino via nRF24L01+ module? Here are my findings: Here is an instructable explaining how to program Arduino wirelessly but this thing uses a BT module which ...
5
votes
3answers
33k views

How do I run a loop for a specific amount of time?

I currently have a for loop that loops 300 times and then moves on. Instead, I'd like that loop to run for a specific number of minutes, instead. Here's the current loop, for reference. for(int i = ...
5
votes
6answers
12k views

LCD 16*02 I2C shield only shows first character printed

I have an I2C LCD screen provided with a Sunfounder kit and certainly built by DFRobot or such a constructor (there is nothing written on the LCD), and an Arduino Uno R3 copy. My issue is when I use ...
5
votes
4answers
655 views

Why would the resistor be after the LED in this project?

This is project 2 of their official arduino projects book called "Spaceship interface". I understand resistors normally reduce voltage so the LEDs don't burnout but here 5v is coming from either ...
5
votes
4answers
18k views

How to avoid blocking while loop reading Serial?

I am currently playing with a MindWave Mobile headset. I am parsing bluetooth data received from a connected BlueSMIRF Silver. The code I started from is a sample from the MindWave wiki and it works ...
5
votes
2answers
7k views

Pre-heat time required for MQ-5 gas sensor

The datasheet of MQ5 sensor says, it requires a pre-heat of 24 hours. Does this mean that it needs to be powered on for 24 hours consecutively before usage? Some other websites (e.g. http://www....
5
votes
6answers
7k views

Arduino Uno not able to handle 2-dimensional array

Now the code I'm writing in Arduino (Using Arduino) uses multiple 2-dimensional arrays. Now when I print some thing using the Serial Monitor it prints it correctly but when I declare and initialize ...
5
votes
3answers
821 views

How do I make another action repeat inside a loop?

So, I've just started programming Arduino (and also in general), so I'm doing basic things, like switching on and off LED's. I've made them light in a sequence and then turning them off (in the same ...
5
votes
2answers
39k views

'Serial1' was not declared in this scope

Trying to do serial communication between 2 Arduino Unos. Code: #include <SoftwareSerial.h> int ledPin = 13; int board; // 1 = Uno. 2 = Mega. int on_off; // 1 = On. 0 = Off. int buzzerPin =...
5
votes
6answers
30k views

How can I run two loops simultaneously on an Arduino Uno?

I'm new to Arduino and I have two devices that I'm trying to control: A RGB LED light strip that can change colors A light sensor that can detect the ambient light level What I'd like to do is have ...
5
votes
2answers
2k views

Detecting the light source location using multiple photoresistors

I am not an expert yet, so please forgive any possibly wrong terminology that I may have used. I am planning to place 6 light sensors in 1 meter (or maybe more) distance from one another, like this (...
5
votes
3answers
2k views

Array + Serial Monitor Problem

I've written a Arduino sketch that converts an analogue voltage to a temperature using a lookup table - code below. I've recently changed my LUT to include more values but ever since that my Serial ...
5
votes
2answers
3k views

Is it wise to use analog input pins to read digital buttons?

I am thinking about building a circuit that is literally going to take 11 of the 14 digital pins of an UNO to communicate with an SD card and an external EEPROM chip (EEPROM programmer). Using 4 ...
5
votes
3answers
15k views

Can I simply unplug the Arduino usb if serial communication is active?

So, after the sketch is uploaded, and I want to turn the Arduino off while it is running a sketch, all I have to do is unplug it. Should be safe as long as nothing is uploading. But I wonder, if I use ...
5
votes
4answers
20k views

How to connect more than 10 sensors to Arduino uno r3

How I can connect more than 10 sensors to Arduino Uno R3? I calculated it and I can connect just 4 fire flame sensors (sensors which can find a fire (a candle, for example)) and maybe 1 ultrasonic ...
5
votes
2answers
2k views

Run code once after programming

I'm using EEPROM to store project settings non-volatile. After reuploading the sketch to my board (over SPI via ArduinoISP), the EEPROM is reset to full 0xFFs and I have to manually do a "software ...
5
votes
2answers
2k views

Arduino to arduino serial communication without a library

So I'm trying to send an array from one arduino to another through serial communication, without using the software serial library. The arduinos are wired rx->tx, tx->rx and ground to ground. I have a ...
5
votes
2answers
2k views

interrupting an interrupt

What should be expected if the code in the timer interrupt ISR does not finish before the interrupt is called again? For example Timer0 ISR(TIMER0_COMPA_vect){} on the Uno. This is for debugging ...
5
votes
2answers
3k views

Why need a delay between readings?

When I learn the tutorial in Analog Read Serial Digital Read Serial both of the code examples have a line of code of delay(1) and I cannot understand the comments clearly: delay(1); // ...
5
votes
1answer
395 views

Arduino PWM malfunctioning

I am controlling 4 motors using the PWM ports on an Arduino Uno (3,9,10,11). For some reason, the motor hooked up to port 11 doesn't move with my current code. I know it's a code issue because I can ...
5
votes
3answers
936 views

Fool Proofing My Arduino IC Checker [closed]

I am creating an IC checker for some high school juniors since a faulty IC can be a nuisance of a bug to find when bread-boarding. These ICs are all simple TTL gating from the 74LS series; the set I ...
5
votes
5answers
17k views

how to set the delay on for 7 hours?

For my application I need to simulate the sunlight including the rising and setting of the sun. I have a program that will light up some LEDs slowly over a period of time but I need to know what to ...
5
votes
1answer
963 views

Arduino on breadboard, and then soldered using a board made on Eagle but won't work

So I'm looking to create an arduino clone to mount on one of my robots. I started off making the arduino on a breadboard, using the instructions found on Arduino's own website and I succeeded. It ...
5
votes
2answers
303 views

Trouble when avoiding delays

I am new to Arduino and I am learning how to avoid using delay. I have written some code to move my servo by 20° using delays, but can only move the servo once with my current code. In setup(), I ...
5
votes
2answers
3k views

Arduino DC motor causes disturbance. What can cause it?

I tried to fix this problem the whole weekend but, after no success I decided to post it here. I would really appreciate any help. The problem The Wi-Fi module activates the DC motor and lets it run ...
5
votes
2answers
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 ...
5
votes
2answers
13k views

Connecting an Arduino to a telephone line?

I would like to connect my Arduino Uno to a telephone line in order to answer a call, record a sequence of DTMF tones, generate a DTMF tone in response, and hang up. The telephone line uses a ...
5
votes
2answers
6k views

UNO analog input voltage reading not accurate

My loop code is this: // read the input on analog pin 0: int sensorValue = analogRead(A0); // print out the value you read: Serial.println(float(sensorValue*5000.0/1023)); delay(1); // delay ...
5
votes
1answer
1k views

PWM signaling with Arduinos: What is the reason for the ground connection?

This may sound like a very dumb question and I apologise in advance. I've gone through reading about PWM and working on some example sketches to control PC fan speeds using PWM and Arduino. In all ...
5
votes
1answer
335 views

What is causing my Uno to wake up?

NOTE: this code was working perfectly fine in another program. I have a simple piece of code that puts the Arduino to sleep. When it is finished and intergrated into my project, it will only wake the ...
5
votes
2answers
103 views

just a silly doubt about glowing an LED

what will happen if i insert the anode of a LED to pin 12 and cathode of the LED to pin 11 and set pin 12 to high and pin 11 to low,will the led glow??
5
votes
3answers
4k views

Make Sure \n is the last character in serial string

I have an Arduino that I've put between a computer and an RS485 device. The job of the Arduino now is just to transmit data but will eventually do data logging and have a small user interface as time ...
5
votes
2answers
3k views

Bit shifting fails with warning: left shift count >= width of type

Given the following minimal working example. I tested this initially with uint16_t and it worked with no warnings. After that, I adjusted everything to work with uint32_t. #include <stdint.h> /*...
5
votes
2answers
8k views

How to generate true random numbers over Arduino Uno without any external hardware?

Using a 'random' function in sketch gives same pattern of numbers every-time. But, I need to generate different numbers such that any number to repeat itself should have a very less probability.
5
votes
3answers
24k views

Sending a value from one arduino to another

I wonder if it is possible to send a value from one arduino to another. Basically, I have one arduino measuring let's say weight, but I want to display that value using an lcd in another arduino. ...
5
votes
8answers
12k views

Two sensors on one input

I got this question from my teacher the other day and I can't figure it out: If you have two sensors from two different outputs but want them to go into one input, what do you need, and how can you ...
5
votes
1answer
764 views

Is my ATmega broken, and would replacing it with another break that one, too?

I was communicating between my computer and my Arduino Uno R3 through Bluetooth using this Bluetooth module. The connector I use has a red wire where it connects to GND, and a black wire where it ...
5
votes
1answer
179 views

How to save a state - make an arduino run a code only once/make aruduino bahave differently the next time he is on

Im building a arduino based bicycle speedometer. When the code starts the user picks his bike size (which I need to calculate the radius). Then I have a state finite machine where the user taps the ...
5
votes
2answers
2k views

Autoranging ohmmeter

Note: Before i explain my issue i would like to note that I am a beginner in electronics. Please pay attention to that when providing solutions and explanations. Thank you. I have succeeded at making ...
5
votes
5answers
3k views

Why do my temperature sensor values become inconsistent when additional hardware is added to the board?

I have this strange problem. My TMP 36 sensor works fine when it is the only thing connected to my Arduino Uno board. The voltage measurements, and thus the temperature, are accurate and consistent. ...
5
votes
2answers
1k views

RTC MCP7940M not counting up

I'm able to set a time and to read it back without any problems but it doesn’t tick up. It stays the same. Even if I restart the serial monitor and thereby resets the buffer(?). So it seems to me that ...
5
votes
1answer
882 views

Cannot compile C++11 code via Makefile

I am building my Arduino project with a makefile: BOARD_TAG = uno ARDUINO_PORT = /dev/ttyACM0 USER_LIB_PATH = /home/prakhar/dev/alfred/arduino/libraries CPPFLAGS=-x c++ -std=c++11 -Wall -...
5
votes
2answers
2k views

How to measure resistance of TFT Touchscreen

I'm using a TFT Touchscreen shield with my Arduino UNO, and I'm running "tftpaint" example by Adafruit. I've noticed that when initializing the Touchscreen object, a resistance value must be provided....
5
votes
2answers
5k views

Programmatically Change Arduino Com Port Name

I have some devices that, when I plug in, will display a unique name, usually a serial number, as opposed to "COM #" is there any way I can have my Arduino Uno (or Mega) give itself a different name ...
5
votes
3answers
519 views

Not getting proper readings on Arduino from MAP Sensor

In recent project, I have to take reading from MAP sensor. So basically, we used analog pin for this. But in my case, I don't get proper result which actually I want. When I'm taking readings through ...
5
votes
1answer
261 views

bitClear doesn't work on most significant bit

I'm currently working on a project where I read a 32 bit sequence. The digitalPin is always HIGH when no sequence is received and starts oscilating with about 1kHz when the sequence starts (RC5). I am ...
5
votes
3answers
19k 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,...
5
votes
1answer
28k views

ov7670 + Sd Card + arduino

I have three devices for making a motion activated security camera system: this is the camera : LINK OV 7670 this is the SD Card module: LINK and a basic motion Sensor: PIR with 3 pin I have an ...
5
votes
2answers
2k views

Why bootloader sizes differs from 0.5 to 8 kilo bytes for different boards?

According to official web info bootloader sizes are 0.5, 2 and 8 kilo bytes for UNO, Pro mini and ATMega2560. I believe all three boot loaders do similar job of receiving serial link data and write to ...
5
votes
2answers
4k views

Parsing JSON on the Arduino

I'm using the ArduinoJson library. There is a great example for parsing a single JSON object in the source code. I am attempting to iterate over an array of JSON objects: #include <JsonParser.h>...

1
3 4
5
6 7
156