r/ArduinoProjects • • Jun 09 '20

want help in a real simple project

All I want to make a simple Arduino circuit that lights up an led whenever a switch is turned off or circuit is opened, I have quite enough material on my hand to make one like few Arduino Uno's and mega, etc

any help of link will be appreciated, I'm not new to Arduino but was away for couple of years

0 Upvotes

10 comments sorted by

6

u/_thxforasking_ Jun 09 '20

Thats simple

While (digitalRead(PINx) == HIGH){ digitalWrite(PINy, HIGH); }

PINx would be the switch, PINy the LED

-8

u/theonlycyberghost Jun 09 '20

buddy can you elaborate further or better come over to my pm

2

u/nsandlerrock Jun 09 '20

It can’t get any simpler than that, buddy

3

u/simeneine Jun 09 '20

Are you looking for something like this? https://www.instructables.com/id/Reading-an-SPDT-Switch/ Might be an Arduino is a bit overkill for this kind of application but a project is good learning!

-7

u/theonlycyberghost Jun 09 '20

those Arduino's were lying for a couple of years so it's fine btw if any of you personally help me I can ship you some Arduino stuff like sensors, displays for free just pay the shipping cost when you receive

2

u/gunkillkill Jun 09 '20

read some docs i guess.

Like you said, you were away for a couple years so you must still know enough to just read docs and find what you want to know.....

1

u/scottyg69 Jun 09 '20

Look at the first few vids in this series. https://www.youtube.com/playlist?list=PLGs0VKk2DiYw-L-RibttcvK-WBZm8WLEP if I recall correctly he covers what you are trying to do in the first or second vid.

0

u/TheArduinoGuy Jun 09 '20

Simply read a pin a button is connected to. If the button is NOT pressed then turn the light on. When it is pressed, turn it off.