New answers tagged

0 votes

Can someone check my code? My Arduino isn't doing a consistent count cycle

Your fuzzy picture is missing a lot of critical information that would normally be on a schematic. Links to technical information on all the hardware devices would help, azon links are normally sales ...
user avatar
  • 1,416
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
2 votes
Accepted

Arduino create Json Array with double values and 2 decimal point

You defined the rounding function round_range(), but never used it. You want to round the numbers that you are putting into the array within the JSON document: rangeValues.add(round_range(buffer_range[...
user avatar
  • 35.5k
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
0 votes

How To Repeat a the specific Code in Void loop() No Of Times

With your current code the back and forth movement should already loop forever. To reduce that to a fixed number of times you can define a counter variable, increase it in movemotor() on direction ...
user avatar
  • 13.7k
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
6 votes
Accepted

lcd.createChar() only allows for 8 custom characters

These displays only allow up to 8 custom defined characters. The hardware just only has the character RAM for at most 8 characters. They will be mapped to char codes 0 to 7 and 8 to 15. The character ...
user avatar
  • 1,059

Top 50 recent answers are included