YouTube video

Things you need

Arduino Uno

Breadboard

Breadbourd  Wire

touch sensor

or 

push button

Led’s

How to build and schematic

With push button

With touch sensor

Hello

This should be very simple, first we make the pin 2 as input and pins 3 & 4 as output with “Pinmode()” command

in void loop 

we have an if, which it reads the value of pin 2 with command “digitalRead()” (it will give us 0 or 1) which if it’s 1 pin 3 turns on and pin 4 turns off by using “digitalWrite()” and if it is other than 1 (it will be 0) it will go to “else” area and turns off pin 3 and turns on pin 4 

simple and easy 

Thankyou for reading please put a comment and give us 5 star

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments