Dark Sensor -Arduino for Beginners




Hi Guys,

This is my first instructable. It's something anyone can do and is a great first project.Please tell me how I could improve by commenting in the comments section. If you have any doubts Email me(Email ID:greatassassin123@gmail.com).
Please vote if you liked it.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Materials Required

i)1*Arduino UNO

ii)1*USB A to B(Normally comes with Arduino board)


iv)1*LED (Any Color)

v)1*1K ohm resistor


vii)3*Male to Male Jumper wires or standard wires with both ends stripped

(Everything is available on amazon)

viii)A computer running Arduino IDE

Step 2: Building the Circuit

Lets get started for real!

1)Connect a resistor anywhere on one of the middle rows.

2)Connect the photoresistor in such a way that its one leg is in the same column as that of the resistor.

3)Connect a wire in the column of the lone resistor leg and put the loose end into the 'GND' port of the arduino board.

4)Connect a wire in the column which is common to both, the photoresistor and the 1K resistor and put the loose end into the analogue port 'A0'.

5)Connect another wire in the column of the lone photoresistor leg and put the loose end into the '5V' port.

6)Put the longer leg of the LED into the '13' digital port and the short leg into the 'GND' port besides it.

Step 3: Code

i)Connect the arduino board to your computer.

ii)Open Arduino IDE

iii)Choose the right port

iv)Copy and paste the contents of .txt file in the IDE.

Step 4: Done!!!

Sensors Contest 2017

Participated in the
Sensors Contest 2017

Be the First to Share


    • Made with Math Contest

      Made with Math Contest
    • Multi-Discipline Contest

      Multi-Discipline Contest
    • Robotics Contest

      Robotics Contest

    5 Discussions


    Reply 2 years ago

    I know that i need a 220 ohm resistor but the led would still work.It is just for learning


    Reply 2 years ago

    Yes the led will still work, but that's not the point: with no resistor to limit the current to about 20-30mA, the Arduino i/o pin is in peril.