Questions tagged [variables]

Variables are used to store data in a sketch/program.

7 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
0
votes
1answer
31 views

Using the same variable between if-statements within loop()

I wonder if there is a good way to use the same variable value between two different if-statements within the loop(). Within the Servomotor section of the code, I want to use the value from the first ...
0
votes
0answers
30 views

How to create parametric variable in class decleration

I hope the subject of this question if correct. in timeOUT constructor, 3 more instances of other class are defined: endTimeOUT_inFlash(key1), inCodeTimeOUT_inFlash(key2), updatedTimeOUT_inFlash(...
0
votes
0answers
30 views

Accel Multi Stepper - Array for timelapse operation

I am trying to run 2 cameras for timelapse. I can do this with a single stepper: void doSteps(long steps) { calcSpeedStepper(); digitalWrite(sleepPIN, HIGH); stepper1.setCurrentPosition(0); ...
0
votes
0answers
204 views

string.charAt() is not returning the correct value

I know this is a super basic question, and I did try debugging, but somehow I think I am missing the way variable stores value in Arduino. int enablePin = 2; // ebanble pin for slave String ...
0
votes
1answer
73 views

Sorting voltage data from pin A0 to 3 variables (ranked)

I don't have any code for this yet but I would like some ideas on coding it. I have a directional antenna that is rotating at a slow speed and a ham radio connected to the antenna. I have an output ...
0
votes
4answers
3k views

Wemos D1R2 - Onewire 2 DS18B20 passing to variable

I'm a beginer, did some tests with Uno and now have a Wemos D1R2 on my hands... I'm building a sort of weather station that will send data to thingspeak.com and log this data there. I managed to ...
-1
votes
0answers
37 views

Variable not updating from inside IF? Ardunio. Uno

First time poster long time leecher. I'll try to edit this best as possible in a moment... Code takes DHT22 data, displays on LCD, push buttons to adjust a setpoint variable (rhset) then uses ...