Questions tagged [arduino-uno]
The Arduino Uno is the most common of the Arduino boards. It is based on the ATmega328P microcontroller.
8,148 questions
0
votes
0
answers
45
views
PIR sensor gives high voltage [closed]
I wanted to test my new PIR sensor but it always shows the LED high voltage. Please tell me what to do?
code:
const int pirPin = 2; // пин pir датчика
const int ledPin = 13; // пин диода или ...
-2
votes
0
answers
33
views
Controlling a gear motor turn a valve handle [closed]
How to make the gear motor to turn only from 0 degrees to 90 degrees and back to 0 degrees?
-2
votes
1
answer
72
views
NEMA 17 with A4988 Runs Smoothly During Code Upload but Moves Erratically Afterward [closed]
Problem Description:
I'm controlling two NEMA 17 stepper motors with A4988 drivers and an Arduino Uno. I'm experiencing a peculiar issue where one motor runs perfectly smooth during code upload but ...
0
votes
0
answers
52
views
Trouble connecting Uno + ESP8266 to Wifi
I am trying to build a simple project to get data from a web server and display it, using an Arduino Uno R3 clone with integrated ESP8266 wifi.
What I have so far:
The ESP8266 attempts to connect to ...
0
votes
1
answer
44
views
Is there a c++ library for the GitHub API and Arduino compatible?
I'm logging some data using an ESP32 board, and I need the data logged to be uploaded from the ESP32 to one of my repositories on GitHub.
Are there any C++ libraries for the GitHub API compatible with ...
0
votes
1
answer
42
views
Sketch Upload Fails -USB bus damaged?
My desktop computer abruptly started failing to upload sketches to the Arduino UNO (a smd "Make: Special Edition" board) I've been working with for the last few weeks. The sketch compiles ...
0
votes
1
answer
57
views
L298N Motor Driver works only for a single direction
I'm using a L298N motor driver with an UNO and when I try to run a motor few seconds for forward and few seconds backward, it will only move for a single direction and remain still in the second ...
0
votes
1
answer
96
views
Ultrasonic sensor showing random readings
I am using a HC-SR04 ultrasonic sensor to measure the distance using an Arduino Uno. When I run this code which is worked perfectly in the previous, it only shows just random readings in the serial ...
1
vote
0
answers
53
views
Why LoRa Ai Thinker 433Mhz doesn't go in Receive mode after we send ACK? [closed]
So basically I created a simple Receiver and Transmitter using Two Lora Ai Thinker 433Mhz (Sx1278). I am using Esp8266 with one Lora (as transmitter). It sends packet when we press button. On Receiver ...
0
votes
0
answers
57
views
Arduino R4 Minima, trigger function being bypassed?
I am running a trigger function in a while loop in setup that takes in 3 analog inputs, checks if they are within a certain range, then outputs true if they are, false if none of them are.
The code I ...
-1
votes
1
answer
111
views
Difference between using GND and digital LOW for 7-segment display pin
I am using this 4-digit 7-segment display.
So my circuit is basically 220 ohm resistors for all the segments (display pins 6 through 16 on the bottom each go through a resistor before going to a ...
-1
votes
2
answers
142
views
I need more free memory on my Arduino. What can I do if I don't want to use float? [closed]
I realize that using float results in loading all or at least parts of the floating point library, which consumes a significant amount of memory.
How can I avoid using float?
-2
votes
1
answer
81
views
How do I change what variable I am changing based on a separate number?
I am trying to change thing2 if I input 0, and thing3 if I input 1. I don't want to just have if/else to determine if I should be changing thing2 or thing3 because I want this to be more dynamic than ...
-1
votes
1
answer
78
views
Replace bootloader in ATTiny88
There are other threads about replacing the bootloader on Arduino boards, but the ATTiny88 seems to be rather a different beast. Instead of creating a serial port and sending the compiled code to the ...
0
votes
1
answer
127
views
Stepper motor not moving
this is my second Arduino project and I am trying to figure out why my stepper motor is not moving. I was able to get a basic 28byj-48 stepper motor to work using stepper.h and some sample code.
Now I ...
1
vote
1
answer
57
views
When I run my for loop the serial monitor is giving very strange results
This is unfinished code for driving a 4 digit 7 segment display. When I run my data function that should output the data to send to the shift register, I get a very weird output.
0 00111111
1 00111111
...
1
vote
1
answer
107
views
Connect ESP32-CAM to L293D
Disclaimer: I'm a programmer, not an electronics expert. I built this car using an Arduino Uno, and now I want to add a camera to it. I’ve tried researching online, but I couldn’t find much ...
-1
votes
1
answer
172
views
MFRC522 RFID RC522 Only Works Sometimes – Unreliable Detection Issue
Problem Overview
I’m using an MFRC522 RFID module with an Arduino Uno, and it only detects RFID tags sometimes. The behavior is inconsistent—sometimes it reads the card instantly, and other times, it ...
1
vote
1
answer
68
views
Using ultrasonic sensors and motors. Measuring and moving at the same time
How to measure distance while controling motors?
I am using an Arduino UNO.
#include <Wire.h>
int motor12pin1 = 2;
int motor12pin2 = 3;
int motor34pin1 = 4;
int motor34pin2 = 5;
int pinJacina12 ...
0
votes
0
answers
95
views
How to Connect/configure HC05 (Bluetooth module) to a shield?
I am a newbie to Bluetooth communication in Arduino.
I have 2 Arduino boards (one runs my main sw, second act as slave to operate a remote command coming from the main board) that i want to establish ...
0
votes
1
answer
90
views
`sprintf` of %04d and %03x at the same time on Arduino
I have this code, work fine!
uint32_t id , id2;
char s[64]; // Should be enough
...
id2 = id = CAN.getCanId();
sprintf (s, "%04d : ", id ); // !!! HERE !!!
Serial.print(s);
the ...
0
votes
0
answers
127
views
ESP8266 Not Booting Properly on First Power On – Works After Restart
I'm working on an ESP8266-based water level monitoring system using an ultrasonic sensor and an I2C LCD. The problem I'm facing is that sometimes the ESP8266 does not boot properly when powered on for ...
0
votes
1
answer
84
views
Push button isn't pushed but keeps printing or inputting 1/HIGH
I have this Arduino code that will print 1 in the serial monitor and even prints two 1's. I haven't even pushed or clicked the push button, yet it already is already set to HIGH and even activates to ...
1
vote
1
answer
157
views
Why does the use of serial.readBytes increase program size by 10kb?
If I put this in my arduino program, in main.cpp, I suddenly run out of memory for flash program size:
if(msgSize > 2) {
//sr::sequentialRead(&serialRead, newTram.hash);
uint8_t bytes[...
0
votes
1
answer
118
views
Alternate LED Blinking Using PushButton
I have an task for my class where we have to make 2 LEDS blink alternatively using a pushbutton. I've figured out how to do the blinking and alternating but from time to time one of the led would go ...
-1
votes
1
answer
53
views
Interrupt service routine calls with RC receiver
I've written an ISR routine using an Arduino UNO wired to my RC receiver. The receiver gets orders through the gimbals in my transmitter and executes the ISR every time the gimbals are moved.
I was ...
0
votes
1
answer
77
views
AccelStepper Library: enableOutputs() causing a shake
I'm using Accelstepper library, when I enable the stepper via enableOutputs() the motor shakes for an instant.
Both motors do a small movement when enabled, if I increase the nr of microsteps the ...
0
votes
1
answer
270
views
Questions about ATMega8A including burning my hex files
I wrote a small blink program for an ATMega8U-DIP I bought recently. The source is this,
#ifndef F_CPU
#define F_CPU 16000000
#endif
#include <avr/io.h>
#include <util/delay.h>
int main(...
-1
votes
1
answer
151
views
FastLED with WS2812B 241228
Hello Arduino Stack Exchange forum,
Learning how to use the FastLED to control a string of 150 WS2812B LEDs
Code copied herewith below compiles and operates as expected.
Trying to figure out how to ...
-1
votes
2
answers
136
views
50 Hz powerline noise using Arduino and mikroe ECG 2 (ADS1194)
I am trying to take ECG measurements using the Mikroe ECG 2 (ADS1194), connected to an Arduino Uno via an Arduino Uno Click shield.
I am able to measure the ECG, and can read the heartbeats somehow in ...
-1
votes
2
answers
79
views
Reading the state of a pin at 35V using arduino at 5V
I have a gate controlled by a motorline MC2 motherboard. I want to add a distance sensor controlled by arduino so that I can give it the opening command when leaving the yard.
From what I have seen, ...
-1
votes
1
answer
66
views
Running full voltage through Transistors
Hello I am trying to create a fan controller using Arduino. The (Placeholder LED's) fans run at 12V 0.23A DC so I have an external power supply for them. I plan to control the flow of this with NPN ...
-1
votes
1
answer
215
views
How do I fix display showing random pixels on ST7789V2 LCD Module?
Problem Description:
I’m trying to interface a Waveshare 1.69-inch LCD module (ST7789V2 driver, 240x280 resolution) with an Arduino UNO board. I’ve connected all the necessary ports as per the ...
1
vote
1
answer
128
views
How to run G code with SoftwareSerial?
I'm trying to build my own CNC machine. Since I need to control a large number of motors at the same time, I want to control it via an Arduino master and several slaves with CNC shields. Now I'm ...
1
vote
1
answer
277
views
LCD display connection without a resistor
Can run a LCD without a potentiometer or a resistor?
I don't have any.
Here it said to connect both:
0
votes
1
answer
93
views
Running stepper motors with A4988's, and might have shorted the Uno when checking voltages with multimeter. Is my circuit design faulty?
What Happened
I'm working on a project to run two peristaltic pumps from an Uno. The previous version used DC motors and L298N's, but I am attempting to upgrade it by using stepper motors and A4988's. ...
0
votes
0
answers
113
views
Input/Output error upload with arduino-cli / avrdude
Unpacked my first Arduino today, an Uno. Went to try the instructions from the arduino-cli getting started tutorial.
When I connect the unit with USB, I get three quick flashes, then slow continual ...
0
votes
1
answer
477
views
Powering SG90 Servo with 18650 battery
I want to power one SG90 servo with an 18650 3.7v battery. Since the working range for the servo is 4.8v-6v, I used XL6009 boost converter and got a 5.8v output. I have measured it with my multimeter. ...
-1
votes
1
answer
86
views
L298N motor driver not working with Arduino UNO R3
I was trying to use the motor driver, but the motors aren't spinning for some reason.
I am sure the motors are working; I tried and tested them. I can't understand if there is a problem with the code, ...
-1
votes
1
answer
72
views
Arduino connect programatically two wires of external 3.3V device
What is a missing puzzle in here, relay, transistor?
I would like to pull pin of external device to the ground programatically using arduino's digital pin.
2
votes
2
answers
737
views
Arduino Uno Serial.write() how many bits are actually transmitted at once by UART and effect of baudrate on other interrupts
With Arduino Uno Rev3, I am trying to maintain a delicate timing while handling data transmission. I want to send 6 bytes at a time, which takes around ~44 us when I time Serial.write(). The time it ...
0
votes
0
answers
96
views
The control function is not sending out correct values
#include <MIDI.h>
int scale = A4;
int oct = A2;
int potval, octval,octval2=0;
int newnote, prevnote = -1;
int newpotval,prepotval=-1,potval2=0;
int trigr = 7; // Ultrasonic right
int echor = ...
7
votes
2
answers
3k
views
Finite loop runs infinitely
To gain better understanding of both Rust and Arduino (Uno), I'm trying to write direct hardware code for Arduino in Rust. Here's a very simple LED blink example, that I've tried to write.
I've made ...
-1
votes
1
answer
182
views
Unable to upload to Arduino Uno after changing port number
I recently changed my port number for the arduino USB from COM8 (what it defaulted with) to COM256 (attempting to see if that will work).
However, whenever I try to upload it gives
'avrdude: ser_open(...
0
votes
1
answer
90
views
Arduino TFT Touch Screen Interface Only Returns One Button Option
I'm trying to create an arduino code that returns a value for the button that was pressed as the user choice. However, whichever button I press the only return is 2. Also, whenever pressing other ...
0
votes
2
answers
782
views
Arduino IDE Failing to Compile Any Sketches
OS: Windows 11
Arduino IDE Version: 2.3.2
I recently opened up my Arduino IDE to find that nothing--absolutely nothing--would compile. Whenever I tried, I got the following error message:
Using board '...
2
votes
1
answer
162
views
L9780 and SPI communication
I'm working on a program to interface with a development board I spun for an L9780 - wideband oxygen controller IC. At this point, I'm trying to get a consistent "status" read back but ...
1
vote
2
answers
218
views
Can't read SD card
I get errors to open file on SD card. This is the instructions I use https://www.instructables.com/Micro-SD-Card-Tutorial/
/*
SD card read/write
This example shows how to read and write data to ...
-1
votes
2
answers
456
views
How 2 bytes can produce negative number, mind blowing?
I am trying to use LoRAWAN and sending tempurature values as less bytes. I found that way and tested it works fine it can send negative and positive numbers as 2 bytes instead of "float" as ...
2
votes
1
answer
204
views
Which Arduino CMake Toolchain should be used?
I am working on an Arduino UNO board and I want to build my Arduino sketch with CMake.
It looks to me there is no official Arduino toolchain version to go by, and I found at least three available ...