New answers tagged programming
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 ...
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
...
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[...
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 ...
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 ...
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 ...
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 ...
Top 50 recent answers are included
Related Tags
programming × 1597arduino-uno × 552
c++ × 201
arduino-mega × 127
serial × 124
arduino-ide × 119
c × 101
sketch × 93
sensors × 91
arduino-nano × 59
esp8266 × 57
led × 56
library × 51
motor × 45
lcd × 44
code-review × 39
array × 38
string × 37
interrupt × 34
servo × 34
pins × 34
communication × 30
timers × 28
bluetooth × 23
atmega328 × 22