-
Notifications
You must be signed in to change notification settings - Fork 233
Open
Labels
ArduinoArduino projectArduino projectAttention NeededIssues which needs to be resolved on a priority.Issues which needs to be resolved on a priority.bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers
Description
This experiment is taken from https://www.javatpoint.com/arduino-switch#:~:text=The%20slide%2Dswitch%20in%20Arduino,used%20in%20small%20circuits%20applications.
The image shown below was drawn on the workspace

This was the ino file used for the above circuit:
const int pinOFswitch = 3;
const int LED = 8;
void setup( ) {
pinMode(pinOFswitch, INPUT);
pinMode(LED, OUTPUT);
}
void loop( )
{
int ValueOFswitch;
ValueOFswitch = digitalRead(pinOFswitch);
if (ValueOFswitch == HIGH)
{
digitalWrite(LED, HIGH);
delay(500);
}
else
{
digitalWrite(LED, LOW);
delay(500);
}
}
The problem is with the slide switch not working in this configuration
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
ArduinoArduino projectArduino projectAttention NeededIssues which needs to be resolved on a priority.Issues which needs to be resolved on a priority.bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers