New answers tagged

0 votes

i download a file that has ino but when i extract it is gone

You only need the esp8266_deauther folder. That is the sketch. The esp8266_deauther.ino file is inside that folder. Arduino sketch is a folder with source files. It must contain an ino file with same ...
user avatar
  • 16k
1 vote

Round to first significant digit

First of all, let me clarify that there is nothing “decimal” in a float: a float is a binary (not decimal) floating point number. The Serial.println() function does a binary-to-decimal conversion for ...
user avatar
  • 35.5k
0 votes

Powering LEDs with Arduino uno 5v

A good question, best asked as you did before frying something. My Arduino rule #1 A power supply the Arduino is NOT! Connect the ground of the LED power supply to the ground of the arduino. Then ...
user avatar
  • 1,416
1 vote
Accepted

Can't get input from 4x4 keyboard

You need to watch out for what you return and if your variables are initialized. So, what happens here: In loop() you call getNumber(). There you declare two variables: userInput, which you ...
user avatar
  • 13.7k
2 votes

Compare interrupt enabled in overflow interrupt behavior is not as expected

I solved it. The points were: In the interrupt TIMER1_OVF_vect, I shouldn't turn off the ADC by resetting ADEN. Instead, I disabled the auto trigger by resetting ADATE. I use some wrong register ...
user avatar
  • 31
3 votes

Connecting various devices to Arduino

As cguck70 already stated in the comments: The pins A0 to A5 can be analog input pins, but they can also be normal digital input/output pins. You can use them to your liking, just like any other ...
user avatar
  • 13.7k
2 votes

I2C sensors not working when I connect to LCD 20X04

Thank you for all your help. I now realize that I have made the wrong I2C circuits. Then I modified them and now the program and the sensors work perfectly. Here is my circuit now.
user avatar
1 vote

Externally powering Arduino while reading voltage off it via USB

Pin 13 is a digital pin, it does not have the capability to read voltage. You need to use one of the analog pins to read voltage, they are prefixed with the letter "A" (A0 for example). You ...
user avatar
  • 1,416
2 votes
Accepted

Why the led is always on in proteus?

Microcontroller inputs don't detect the presence of current. They compare a voltage to a threshold. In reality the input pin is closest to a capacitor. You press your button and it charges that ...
user avatar
  • 101k
0 votes

Finding position using mpu6050

I have been working on a similar problem and integration of the values of acceleration to get velocity would give you a significant error and would be problematic. Try using kalman filter to filter ...
user avatar
0 votes

How to connect two LED strips (APA102/SK9822) to Arduino UNO?

For minimum pins, daisychain them together, with the clock and data outputs on the tail end of the first strip connecting to the clock and data inputs on the second strip. https://www.pololu.com/...
user avatar
  • 2,292
1 vote

how to save float with 3 decimal places

This is because the data is saved with two digits in the float variables. No, it's not. It's because Serial.println() by default prints only 2 decimal places. You can specify the number of decimal ...
user avatar
  • 101k
0 votes

Getting more Hz while working with 3 serial ports (IMU sensors)

There is a memory device called FRAM, It is available in many sizes. I work with 32Kx8 which is under $5.00 US from my favorite china supplier. No write delays, works with SPI or I2C you can get ...
user avatar
  • 1,416
3 votes
Accepted

Arduino compiler shows different value of sram memory

Both are correct depending on what value you are interested in. The compiler tells you the size of the global variables. Your code tells you how much memory is free at any one time. Running code ...
user avatar
  • 101k
5 votes
Accepted

I2C sensors not working when I connect to LCD 20X04

Welcome to Stack Exchange! I can spot a few problems with the circuit. As @hcheung said, the I2C pull-up resistors should only be wired between SDA>3.3V and SCL>3.3V (in parallel), not in series ...
user avatar
1 vote
Accepted

What is my code lacking that the servo rotates non-stoppingly? Servo should rotate 180 when distance is <= 50 and 0 when this condition is not true

Checking your program I found two errors IMHO. Please see the comments in the copied code below. The one also pointed out by @EdgarBonet definitely prevents your program from working correctly. The ...
user avatar
0 votes

Why does my delay get inaccurate after one minute ? It makes my servo vibrate

Without looking into the details of your code, it looks like you are having issues with interrupts. According to your comment, this simple code gives a very uneven pulse length: digitalWrite(SERVO_PIN,...
user avatar
  • 35.5k
2 votes

Can't manage my calculator to work

Consider this excerpt from your code: int getNumber() { char user_input = keys.getKey(); int value; if (user_input) { // ... } return value; } Think about what would ...
user avatar
  • 35.5k
0 votes
Accepted

How do I keep one function continued until a variable is completed?

You have a couple of issues in your code. Analog inputs are versatile and (most) can be used as digital inputs. You are declaring the LDR pin as a digital pin by pinmode(ldr, INPUT). Delete this line ...
user avatar
  • 3,042

Top 50 recent answers are included