tom_25
October 19, 2023, 3:06pm
1
Hello, I have a toogle button that always goes back to the center. Connect it to the analogPin A0 but in serial monitor is this. If I move the lever, nothings change. And i am beginer, and using a motor shield.
void setup() {
pinMode(A0, INPUT_PULLUP);
Serial.begin(9600);
}
void loop() {
Serial.println(analogRead(A0));
delay(50);
}
Wiring diagram please.
why analogRead()
Post a connection diagram.
tom_25
October 19, 2023, 3:19pm
4
can be a photo? I don't know how i can create wiring diagram sorry
tom_25
October 19, 2023, 3:20pm
5
why analogRead, just to look if the toogle button working
Use a piece of paper and pencil.
tom_25
October 19, 2023, 3:22pm
8
i don't know how draw it, sorry.
tom_25
October 19, 2023, 3:36pm
11
hey!! i have it, thank you,
system
Closed
April 16, 2024, 3:37pm
12
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.