I first get the photoresistor and LED circuit workd and then add the potentiometer in. The circuit I built is a bit complex with many wires since I got each item connect to + and - seperately.
The first problem I encountered is forgetting to use 10k resistor with photoresistor. This makes my first circuit not function.
The second problem is about the code. I excluded the lines to control lightness with potentiometer out of the if statement at the start. This makes these lines cover the if statement since our outputs are all read to the same ledPin.
Content Rating
Is this a good/useful/informative piece of content to include in the project? Have your say!
You must login before you can post a comment. .