Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in the slide switch behavior #463

Open
nagsides opened this issue Feb 8, 2023 · 0 comments
Open

Bug in the slide switch behavior #463

nagsides opened this issue Feb 8, 2023 · 0 comments
Labels
Arduino Arduino project Attention Needed Issues which needs to be resolved on a priority. bug Something isn't working good first issue Good for newcomers

Comments

@nagsides
Copy link
Contributor

nagsides commented Feb 8, 2023

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
image

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

@nagsides nagsides added bug Something isn't working Arduino Arduino project good first issue Good for newcomers Attention Needed Issues which needs to be resolved on a priority. labels Feb 8, 2023
@nagsides nagsides pinned this issue Feb 8, 2023
@firuza firuza unpinned this issue Feb 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arduino Arduino project Attention Needed Issues which needs to be resolved on a priority. bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant