Just got an Arduino and I'm messing around having some problems with the lights.
I believe I am using a common anode led, so I have the three color pins going through a 270 ohm resistor to 10, 11, and 12 on the arduino. The last is hooked directly to VSS.
Much like this: http://www.instructables.com/id/RGB-LED-Tutorial-using-an-Arduino-RGBL/step2/Testing/
Now, it is working oppositely to what I would predict. When I write analogWrite( red, 0 )
, the led is lit red, and 255 turns it off completely.
Now, adjusting the value from 0-254 barely adjusts the brightness at all. 255 is completely off after it flashes for a second.
Can anyone explain what exactly is going on?
analogWrite
will work not as expected for that pin. – A.H.