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
6
votes
1answer
1k views

Sending MIDI messages using PING ultrasonic sensor

I am working on a project that uses a potentiometer and an ultrasonic sensor to create MIDI signals. This is my first time working with an arduino. I took a class in C++, but am teaching myself some C ...
6
votes
3answers
21k views

How to reset ATmega328P fuses using USBasp programmer?

I think I bricked two ATmega328Ps when I was trying to burn new bootloaders using Arduino Pro Mini, the USBasp programmer and the Extreme Burner AVR software. I had two ATMega328p with bad booloaders ...
6
votes
1answer
25k views

Get data from website with ESP8266 using AT commands

I'm trying to get data from a website by sending a HTTP GET request via AT commands for the ESP8266. Here is my current code: #include <SoftwareSerial.h> const byte rxPin = 2; const byte txPin ...
6
votes
2answers
2k views

How to measure voltage with Arduino analog input

I'm totally new to Arduino and to electrodynamics in general. I'm wondering what happens if I connect my digital pin to an analog input on Arduino, and make digitalWrite and analogRead on the ...
6
votes
5answers
10k views

Simultanous read and read/write on two serial connections

At the moment I'm using two softserials to connect to a GPS and an GSM module. It seems not possible to have two open software-serials. So I was looking for an solution After the initial-setup, the ...
6
votes
1answer
602 views

Problems with transmission between ATtiny85 and Arduino Uno with 433MHz RF modules and Manchester

I am trying to transmit from an ATtiny85 running at 16MHz internal clock to an Arduino Uno with the Manchester Library. The problem is that the Arduino is not receiving any data. I have hooked an ...
6
votes
1answer
277 views

Why does pulse sensor shows gaps when I move it?

I modified the serial code in this way and I don't think the gap is produced by my edit even because it made it even before: ////////// ///////// All Serial Handling Code, ///////// It's ...
6
votes
2answers
9k views

arduino creates strange files in SD card

I'm new to Arduino and electronics. I want to make a project including SD data-logger, but I had a problem. I would appreciate if someone show me where I made a mistake. Firstly, circuit was set up ...
6
votes
1answer
3k views

Level tracking using optical or capacitance sensors

I am looking to devise a level tracking system using arduino and some sensors. My particular situation is I have solute that is coming out of solution and I want to track the formation rate of the ...
6
votes
1answer
542 views

Choosing right Sleep state

I'm planning on building an LED clock, but I want it to be lit only when I press the POWER button on my remote control. Using an IR receiver, which Arduino sleep mode should I use to reduce the ...
5
votes
7answers
4k views

Can Arduino control 8 solenoids?

I know very little about Arduino and even less about programming one. Before I purchase a board, and learn how to program it, I was wondering if my idea is feasible. I want to program the Arduino to ...
5
votes
5answers
7k 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
6answers
7k views

Understanding why should avoid “String” and alternative solutions

Why “Strings” are bad for Arduino? Which is the most efficient and fastest solution to read and store the data from Accelerometer and GPS? Stings are evil for Arduino An Uno or other ATmega328-...
5
votes
6answers
10k 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
1answer
9k views

Can I use analogRead to read a digital pin?

analogRead(nGPIO_max + lockerVal) were nGPIO_max(maximum digital pins in Arduino Uno is 13) and lockerval is 2. Which pin is it reading?
5
votes
6answers
12k views

Good button debouncing/stateChange library

I need debouncing/stateChange for a push button configuration. Is there a good library for debouncing/stateChange buttons in Arduino (without delay)?
5
votes
4answers
23k 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 ...
5
votes
3answers
1k 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
6answers
29k 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
1k 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
6answers
6k 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
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
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
1k 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
3answers
917 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
2answers
1k 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
389 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
2answers
18k views

Why does an Arduino UNO need two GND ports?

I have really bad eyesight, so whenever I plug in the power wire and the GND wire I always double check if I'm actually plugging in to the power port not one of the two GND ports. Why does an ...
5
votes
3answers
23k views

How to get current time and date in arduino without external source?

I'm working on a project using Arduino Uno and SD card shield. I'd like to store a variable at a specific time everyday in the SD card. How can I get the current time in Arduino ? Any help would be ...
5
votes
1answer
911 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
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
3k views

Protecting your computer from stupid (arduino) mistakes

I recently ran way to much voltage through my Arduino and back into my computer via the USB connection. I'm looking for a USB hub with a fuse or some sort of protection to protect my laptop from these ...
5
votes
2answers
300 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
2k 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
1answer
10k views

How to properly use volatile variables in Arduino?

I was doing a small project with an Arduino Uno. It involved interrupts as I am using encoders to measure how much the differential wheel system moves forward. My robot moves only forward. So I use ...
5
votes
3answers
11k views

Issue sharing MISO with multiple RC522 RFID Readers

so for about the last 8.5 hours (almost non-stop) I have been trying to figure out one issue and I have exhausted every search I could possibly think of. I'm building a puzzle that requires 5 RFID ...
5
votes
2answers
6k 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
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
2answers
10k views

How to choose between AM230x and DHT22 temperature and humidity sensors?

I'm looking forward to getting an accurate humidity and temperature sensor. Right when I decided to go with a DHT22 module, I saw AM230x (AM2301, for example). How do I choose between DHT22 and ...
5
votes
1answer
321 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
1k views

Formula / calculation of the function random() / randomSeed()

In which file can I find the calculation that is called with random()? If it is not too much could you also post the content in your answer? I am using an Arduino Uno and its standard IDE. I found ...
5
votes
2answers
45k 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 ...
5
votes
2answers
1k 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
1answer
17k views

Expected unqualified ID before numeric constant

After debugging and having some conflicting declarations about analog pins, I finally thought it was done, after compiling I got this error: 32:0, 1: 31:12: error: expected unqualified-id before ...
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
2k 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
3answers
21k 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
10k 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 ...