Introduction: How to Make a Light Controlled Led With an Arduinno
This is a fun and simple Arduino project that anyone can make
Step 1: What You Need
- Arduino Uno
- Jumper wires
- LED
- a Photo cell
- a breadboard
- Jumper wires
- LED
- a Photo cell
- a breadboard
Step 2: Step 1
First you need to plug the led into the breadboard and hook the positive lead into pin #8 and the negative lead to ground with the jumper cables.
you will then need to hook the photo cell into pin 13 and the ground pin
you will then need to hook the photo cell into pin 13 and the ground pin
Step 3: Step 2
you now need to hook up your Arduino to your computer and copy and paste the script below into your Arduino software
void setup() {
pinMode(8, OUTPUT);
pinMode(13, INPUT);
}
void loop() {
if(digitalWrite,13== HIGH){digitalWrite(8,LOW);}
if(digitalWrite,13== LOW){digitalWrite(8,HIGH);}
}
void setup() {
pinMode(8, OUTPUT);
pinMode(13, INPUT);
}
void loop() {
if(digitalWrite,13== HIGH){digitalWrite(8,LOW);}
if(digitalWrite,13== LOW){digitalWrite(8,HIGH);}
}
Step 4: Finished
Feel free to tweak this instructable and leave it in the coments below
if you like this instructable please check out some of my others
feel free to comment and vote for this instructables
THANKS!
if you like this instructable please check out some of my others
feel free to comment and vote for this instructables
THANKS!
![Battery Powered Contest](https://content.instructables.com/F17/FTS5/HH2VJPTU/F17FTS5HH2VJPTU.jpg?auto=webp&frame=1&width=320)
Participated in the
Battery Powered Contest
![Kit Contest](https://content.instructables.com/FHE/GQWU/HGH70Z6O/FHEGQWUHGH70Z6O.jpg?auto=webp&frame=1&width=320)
Participated in the
Kit Contest