Closed GoogleCodeExporter closed 9 years ago
Which board are you using?
Original comment by jaguar3s...@gmail.com
on 6 Nov 2012 at 1:09
DigitalWrite only makes the output fully HIGH or fully LOW. If you want the led
to light up based on the amount of light the photoresistor is receiving, you
need a pin with PWM and use analogWrite. Also instead of dividing the reading
from the Photoresistor by 4, just MAP the values.
analogWrite(ledpin, map(PRvalue, "lowest PR value" , "highest PR value", 0
,255));
Original comment by mascoloa...@gmail.com
on 8 Nov 2012 at 3:53
Digital pin 11 is a PWM pin. Changing it to digitalWrite will just turn the LED on all the time.
Original comment by s.fitzge...@arduino.cc
on 2 Apr 2013 at 8:59
Original issue reported on code.google.com by
igna...@turegano.it
on 5 Nov 2012 at 10:47