hacky-tube13
Published

Automatic Night Light! Arduino

This will automatically make your room better!

IntermediateFull instructions provided747
Automatic Night Light! Arduino

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
Breadboard (generic)
Breadboard (generic)
×1
Jumper wires (generic)
Jumper wires (generic)
×1
LED (generic)
LED (generic)
×1
Photo resistor
Photo resistor
×1
Resistor 1M ohm
Resistor 1M ohm
×1
Resistor 220 ohm
Resistor 220 ohm
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Circuit diagram

Code

This is the code!

Arduino
int luminosita;  
int ledPin = 10;  
void setup() {
}

void loop() {
  luminosita = analogRead(A0);  
  luminosita = luminosita/4;  
  analogWrite(ledPin,luminosita);  
  delay(10);  
}

Credits

hacky-tube13
1 project • 0 followers

Comments