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

LEDs controlled by PHONE on ESP32

I am having doubts with a project I'm making. My project involves a sets of LEDs stripes, among which some are controlled from a smartphone, and some automated. The LED strips are connected to an ...
-1 votes
1 answer
34 views

Does ADXL 345 accelerometer not wirk with Arduino Uno without soldering?

I followed the Adafruit tutorials to wire the ADXL 345 with Ardiuno Uno, but it is not able to detect the sensor. It did not mention that I need to solder the ADXL 345. Is soldering necessary?
1 vote
2 answers
94 views

Stoplight Simulator - White LED not turning on with button press

I am working on a relatively simple stoplight simulator that uses four LEDs - red, green, yellow, and white - in addition to a button. The 3 colored stoplight LEDs cycle as a real stoplight would. If ...
1 vote
2 answers
61 views

PWM with a TRANSISTOR on flexible LED filament

I would like to create a custom lighting, with PWM capability, powered from battery. I would like to use flexible led filaments, and since those consumes more than 40mA, I can't use them directly on a ...
1 vote
1 answer
29 views

Fading out a led with reed switch loop

I was hoping to get some help on the fading led which I am working on. For my project I need to have a led, which when it is placed next to a magnet, continuously shines, but as soon as it is taken ...
  • 13
0 votes
1 answer
106 views

How can I make conditional statements work with boolean ( true /false) to turn on and off blue leds [closed]

I'm working on a project to build a plant monitor with Arduino that picks up light and water values from it's environment and I've come across a roadblock in the code. Here's the code fully. //** *...
0 votes
2 answers
84 views

How do I put a LiquidCrystal_I2C class in a Lcd class?

I want to make my main code cleaner so I was thinking of making a Lcd class which I can use every time I need to print on lcd. So my main code every time I try to print text I need to call : lcd.clear(...
2 votes
1 answer
52 views

Multiple unique I2C devices interfere

I'm trying to make a fairly simple program that interfaces with the Adafruit TSL2591 light sensor as well as a MAX30102 pulse oximeter. They both use I2C for communication. I'm using the recommended ...
-1 votes
1 answer
41 views

How to create a function that will input a certain value for an subvalue of an array depening on the position of a joystick? [closed]

I need to make this project for class and my teacher doesnt know how to code. Basically the project is as follows: A remote with a joystick on it and depending on the position of the joystick it will ...
  • 1
0 votes
1 answer
31 views

power 12v solenoid from DC jack of Arduino Uno

I was wondering if it is possible to power up a 12V solenoid valve from the DC jack of the Arduino Uno, provided that I'm powering the Arduino from the same jack:
1 vote
0 answers
57 views

Getting “Open the GPS power failure” on module SIM808

I tried to get the gps coordinates with this program: #include <DFRobot_sim808.h> #include <SoftwareSerial.h> #define PIN_TX 8 #define PIN_RX 7 SoftwareSerial mySerial(PIN_RX,PIN_TX)...
-1 votes
1 answer
82 views

How many stepper motors can you run on one Arduino Uno? Ideas on how to run 9?

I am in middle school and new to Arduino. I just learned to set up and code a stepper motor on my Arduino Uno from watching YouTube videos. I want to set up 9 stepper motors to all run at the same ...
-1 votes
3 answers
73 views

Is there any way to efficiently code reading of four sensors and sending a serial output once it does detect a reading?

I am actually wondering if there's a way to efficiently do this block of code. There are two things in my specifications and these are: Four IR Sensors that detects blockage. Basically just to ...
0 votes
1 answer
40 views

How to control PWM and digital pins at the same time over ethernet in arduino

I am using Controllino Maxi. It has an Arduino Uno inside it. I am trying to control the PWM pin D0 and digital pin R0 via python code. Below is the code I have upload on arduino: Arduino Code: #...
  • 151
-1 votes
1 answer
38 views

Continous Rotation Servo not changing directions

I have coded a robot to be controlled by a ps3 Controller. I am using continous rotation servos but unfortunately I can not figure out how to get them to change direction. My input for my if ...
  • 1
2 votes
1 answer
67 views

The code to turn off the RGB LED by pressing the 4,5,6 switches in sequence doesn't work

I'm making photoresister alarm. When distance under 5cm over notes[] 5 times, piezo speaker off. And I want to turn off the led rgb by pressing the 4, 5, 6 switches in sequence. The code to turn off ...
  • 21
1 vote
1 answer
78 views

How to read and parse UART data from human presence radar sensor

I'm working on a project, and I purchased a 24 GHz "Human existence/presence" mm Wave sensor from micradar, the R24DVD1. The output of the module is serial data which varies in length and is ...
  • 11
-2 votes
1 answer
93 views

How can I send Arduino sensors data to java application?

my final year project is to do an Arduino watch that has heart rate and body temperature sensors and also a location tracking module. I need to send all the watch data to my java app but I don't how ...
1 vote
0 answers
52 views

Arduino Uno Stuck at uploading

I wrote a basic blink code and tried to run it on the auduino IDE. Compilation was sucessfull but the code stucks at uploaing. I turned on the verbose output while uploading and this is what I have ...
  • 11
0 votes
1 answer
59 views

Balancing pendulum using PID

Dear all, referring to the video at here on how to make a PID balancing pendulum as shown in the picture and the author also provided the arduino code in the video description. May I ask whether this ...
-1 votes
1 answer
85 views

How to write arduino code in a c/c++ script

I'm pretty new to arduino. But I have some knowledge about programming in c/c++. I know that arduino is written in c. But it can't be used as normal c/c++ code. for example , instead of including some ...
0 votes
2 answers
231 views

The same button with one click and double click [closed]

i hope to get some help with my code. I am trying to distinguish between a single press and a quick double press of the button with debouncing. I am making some silly mistake in my code and i can't ...
0 votes
2 answers
80 views

How to reduce codes numbers

I am new in Arduino projects, i made a digital counter that counts from 00 to 99. Here is my code below void setup() { pinMode(0,OUTPUT); pinMode(1,OUTPUT); pinMode(2,OUTPUT); pinMode(3,OUTPUT); ...
-1 votes
1 answer
58 views

I2C HMC5983 communication issue

I have a really weird problem, when I run the exmple wire (I2C) scanner from Arduino, I get: I2C Scanner Scanning... I2C device found at address 0x1E ! done However when I try directly to the 0x1E I ...
0 votes
1 answer
61 views

Arduino not recognizing external microcontroller

I've been trying to follow the official Arduino instructions on how to program and power an external breadboard, and I've gotten a pack of ATmega328p's that may or may not have been preloaded with the ...
  • 127
0 votes
2 answers
130 views

Changing Frequency of PWM Pin on Arduino Uno

I am trying to change the frequency of the PWM output from an Arduino Uno R3 (Been using Pin 9) to 200 Hz with a duty cycle of 20%. This is for an ESC that is connected to a 12V motor, and I know the ...
0 votes
1 answer
91 views

Connect OLED SSD1306 to Elegoo Uno R3

I'm trying to connect the OLED SSD1306 screen to my Elegoo Uno R3 and display something using Arduino IDE. However, nothing shows up on the screen for some reason. I have connected every pin in the ...
  • 113
0 votes
1 answer
67 views

Problem with character concatenation algorithm in matrix led

good afternoon, I am making a 7x10 led matrix in which I use a CD4017 to handle the 7 rows and 2 cascaded shift registers to handle the 10 columns. I first tried a programming to turn on my entire led ...
0 votes
0 answers
93 views

How to program Attiny12 with Arduino?

I bought a bunch of Attiny12's from Digikey without checking if I can even program them with an Arduino. I've looked around a bunch, and I've only ever found ways to program Attiny13 and Attiny10. ...
0 votes
2 answers
47 views

Bluetooth Arduino Data Type Error

In my code I want to send some float values from my phone to the Arduino's Bluetooth which I will then split using the substring function. it will then print that split value to the serial monitor. I ...
0 votes
1 answer
195 views

No matching function for call to'DS3231 (const uint8_t &, const uint8_t &)

This was supposed to be the code for automatic pet feeder Got it from here1 The problem is that I always got a "No matching function for call to'DS3231 (const uint8_t &, const uint8_t &)&...
0 votes
1 answer
34 views

How to upload code to Arduino without a laptop

I would like to know is there a way of burning programs to microcontrollers like that on Arduino without using a computer? Like a pendrive or something? Suppose you want to update firmware on a ...
0 votes
1 answer
50 views

Library files multiple users

I want to place all of my libraries on the server. Currently the sketches work fine and as far as I know the libraries are coming from the individual linux mint machines using cinnamon, releases vary ...
  • 1,579
1 vote
1 answer
57 views

Display issues with 4 Digit, 14 segment

I have this HT16K33 4 Digit 14-segment display I got brand new. I connected it to my Arduino UNO, wired it up and uploaded some quick test code. However, the display looks completely broken (see image ...
1 vote
1 answer
102 views

Why does Serial.print(1) cost 228 bytes more program memory compared to Serial.print((char)(48+1))?

Just discovered this. When I cast an int to a char inside a Serial.print statement it costs way less program memory. I'm not sure why. Could someone explain this to me? In the following example the ...
  • 55
1 vote
1 answer
257 views

How do I control the speed of a 2-wire fan with an Arduino and only a potentiometer?

I am trying to vary the speed of a 2-wire fan by using a Arduino Uno and only a potentiometer. Initially, I assumed that I could go about doing so by using a code that I used for dimming an LED. When ...
  • 13
0 votes
2 answers
73 views

Shiftout only handles one shift register at a time

I am making a 7x10 led matrix and I am having problems with the shiftout function. It is only able to show me the output in one shiftout register at a time. How can I fix it? For example: void setup()...
0 votes
1 answer
218 views

Can i use SCL, SDA pin for I2C

I read this article. In the article, it uses A4 and A5 for I2C. But can I just use SCL and SDA pin directly in the Arduino UNO R3? And do I need a put-up resistor for SCL and SDA pin?
  • 3
1 vote
3 answers
95 views

Is there a way to strip a library from all unused parts and defines, automatically?

Say you want to investigate part of the code you use from a rather large library, but it's buried between all kinds of #defines and classes etc, that you're never gonna use in your code. Is there a ...
  • 55
0 votes
1 answer
125 views

Odd characters in serial monitor

I have been recently working on a website that takes input from the arduino ie- temperature and humidity. But there is a fatal problem that I've encountered, the serial monitor spews out some garbage ...
0 votes
1 answer
130 views

How to read and Serial.print the contents (current values) of an 8-bit register?

Currently I'm using: ADMUX = 0b01100000; //example for (int i = 7; i >= 0; i--) { Serial.print(bitRead(ADMUX, i)); } This correctly prints: 01100000 But is there a simpler way? Before ...
  • 55
-1 votes
1 answer
88 views

I need help with code for my automated garbage bin compressor

Here is my problem, I'm working on an automated garbage bin compressor. When the garbage is near the sensor, the compressor mechanism will trigger. I'm using Arduino Uno as the controller, a 12v AC ...
  • 11
-1 votes
1 answer
95 views

PIR sensor is already high, even though it is not detecting any person

I made codes like this through tinkercad. const int temperature = A0; int pir = 7; void setup() { pinMode(pir, INPUT); Serial.begin(115200); } void loop() { int pir_state = digitalRead(pir)...
0 votes
1 answer
54 views

Compile Error Getting when i try to read firebase data using esp32 in Arduino IDE

I am trying to read the firebase data using esp32, when i try to read firebase data statically(string literal) no error is coming. String board=Firebase.getString(fbdo, F("Device/board")) ? ...
0 votes
1 answer
57 views

Do I need to connect a capacitor to AREF if using internal reference? _BV(REFS0)

This is from the Atmega328p datasheet. But I see no mention of it in practical examples. So when I'm setting up the timer for ADC with: ADMUX = _BV(REFS0); Should I add the cap? Or might it be ...
  • 55
1 vote
1 answer
63 views

Do these bit settings all mean the same?

ADMUX = ADMUX | _BV(REFS); // uncompounded bitwise OR ADMUX |= _BV(REFS0); // #define _BV(bit) (1 << (bit)) ADMUX |= bit(REFS0); // #define bit(b) (1UL << (b)) bitSet(...
  • 55
0 votes
3 answers
134 views

How do I go about pausing/stopping the timer1 task setup in this library, so I can use timer1 for something else in my code

So I want to use this library, that uses timer1 to fetch samples from analog input on pin A0. It works great, and so after proper detection I'd like to perform all kinds of different tasks. But for ...
  • 55
0 votes
1 answer
63 views

DHT11 stops working when power comes from a power supply board

I had a mini project with a DHT11, a temperature and humidity sensor, working perfectly on my Arduino UNO clone. Then, I bought a power supply board, that can feed the sensor with the 5V it requires, ...
0 votes
0 answers
36 views

How does C2 work on the ATMega328P?

What is the purpose of C2 on this schematic below? How does it work when the microcontroller is being programmed?
1 vote
1 answer
67 views

Removing spaces between characters in MD_Parola

I'm using ESP8266 and Max7219 module (8*32) and MD_Parola library. To create my own font, at first I used of MDParolaFontEditor and created the following fonts. I edited file MD_MAX72xx_font.cpp ...
  • 19