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
-2 votes
1 answer
121 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
65 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
73 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
91 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 ...
1 vote
2 answers
392 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
73 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
207 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
108 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
68 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
138 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
58 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
281 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
53 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
54 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,591
1 vote
1 answer
88 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
116 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
519 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
89 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
306 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
104 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
1 vote
1 answer
180 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
187 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
89 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
114 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)...
-1 votes
1 answer
80 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
84 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
157 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
83 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
98 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 ...
  • 27
2 votes
0 answers
163 views

Arduino filling serial buffer with nulls

I just wrote some code that just sends a string from Arduino to Processing. Processing prints the string and displays the number of characters in the buffer... After uploading the sketch to the ...
  • 21
1 vote
0 answers
109 views

Uno: Infrared Transmitter Module Not Transmitting

I purchased https://www.jaycar.co.nz/medias/sys_master/images/images/9677365510174/XC4426-dataSheetMain.pdf, which seems identical to https://arduinomodules.info/ky-005-infrared-transmitter-sensor-...
1 vote
0 answers
25 views

code not getting uploaded to Arduino [duplicate]

when I try to upload any code to Arduino it isn't getting uploaded the "RX LED" keeps blinking about 10 times but the "TX LED" doesn't light up. I have done a loopback test but it ...
0 votes
1 answer
67 views

Arduino Uno usb 5v and external power supply 12v overheating

I have a issue with my Arduino Uno r3. I am sorry for my English and explanation of my problem I am not great with explaining. I'm not sure why is that happening but I have 5V 18A power supply to ...
3 votes
1 answer
136 views

I'm using nRF2401 and in my transmitter and receiver the Rx is not blinking and Tx is blinking; why does Rx not blink?

I did a search on the meaning of RX and TX and it seems TX means sending data and RX means receiving data. So when my transmitter is turned off, my receiver looks like this and it works with a battery:...
  • 31
0 votes
2 answers
79 views

Standalone ATMega328 - do I need to burn the bootloader?

I want to get an ATMega328 off of the Digi-Key, and use it like an Arduino (without requiring the whole Arduino board). When it comes to programming, do I need to do anything special like burn the ...
0 votes
1 answer
37 views

digitalWrite giving different output voltages between programs

I'm using an arduino uno R3 for lighting a few LEDs in response to coputer control. I've written two programs, the first to try an Object Oriented style, and the second to split up the code into more ...
  • 3
-3 votes
1 answer
59 views

displaying double variable problem (Arduino)

so I have a problem with displaying a double variable in OLED & IR remote calculator, like this (using u8g2): displayTextOnRight(String(100000, 0)); //ex. of an void and a number It displays: &...
0 votes
1 answer
94 views

Arduino alternating between high and low signal without button press

I have connected my LCD with arduino uno. I am controlling contrast with the library and not the potentiometer. I am trying to read input from the button, it is connected to pin 9 of arduino. The ...
  • 111
2 votes
1 answer
105 views

What components can be connected to pins 0/1 (RX/TX) without preventing uploading of code?

For a robot project I am using an Arduino Uno, and am running out of pins. The simplest solution would be to use digital pins 0/1. I know this means that I won't be able to use Serial communication (...
  • 31
1 vote
3 answers
137 views

LM7805 gets very hot with four servo motors

I'm making a robotic arm using three SG90s and one Futaba s3003 servo motors and an ESP32 dev_kit_V4. The problem is when I am controlling the arm, the voltage regulator gets so hot that I can't touch ...
0 votes
1 answer
74 views

Is Arduino's USB communication protocol the same as USB modems use?

An Arduino Uno uses for the default USB communication either an FTDI chip in early versions or a microcontroller that emulates/replicates the FTDI chip communication. Is this type of USB ...
-1 votes
1 answer
42 views

How to connect Draw wire encoder to Arduino Uno?

Hello Stack Community, I am new to Arduino, and I am trying to figure out how to connect a draw wire encoder to Arduino and collect data from it. I have attached a link of the product that I currently ...
  • 3
0 votes
1 answer
161 views

Problem with displaying true RMS of the main voltage using Arduino Uno and MAX7219

I want to display the true RMS of the main voltage using an Arduino and a MAX7219. At first, I used of circuit #1 (the following circuit) and the True RMS library. The circuit could successfully ...
  • 27
2 votes
3 answers
1k views

Using Visual Studio Code to program an Arduino

I had recently got an Arduino Uno and did quite a few programs on it. Now, I had always used Visual Studio Code to do my C projects. So, is it possible to use Visual Studio Code to program an Arduino, ...
1 vote
0 answers
46 views

How initialise and uninitialise serial based on the user's input?

In Summary. If the argument is true, I want to create a function that prints the necessary stuff into the serial. However, if its false serial is uninitialised and does not print anything, it only ...
  • 11
0 votes
1 answer
102 views

Arduino + ESP8266 to send MQTT messages

I'm wondering if an Arduino Uno (or any other 328 family) that connects via Serial to an ESP8266 can send MQTT messages, rather than AT commands.
  • 909