Pages: [1]   Go Down
Author Topic: Diecimila  (Read 300 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 1
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm trying to create a matrix of 12 LED's, 4 of which will be dimmable with analog values, and they are using pins 5,6,10,11.  The problem I'm having is that 5 and 6 are analogWrite to 0, yet the LED's are glowing at a very low level.  I'd like to know if there is a trickle voltage or some sort of setting which is providing constant voltage from the 5 and 6 pins that I can't override with analogWrite.
Logged

Greenwood, Indiana
Offline Offline
God Member
*****
Karma: 0
Posts: 508
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I tried it and you're correct. I used pin 5 and it's fine digitally, the minute it gets a analogWrite it will never go completely off even if I set it to zero with analogWrite

BUT
Try this:

In setup set the offending pins as outputs. analogWrite doesn't care

When ever you need a zero digtalWrite(pin,  LOW);

I just tried this and it worked. I tried setting the internal pullup on and off with no effect so I'm not sure why those pins are acting up.

Logged

If it was designed by man it can be repaired by man.

Pages: [1]   Go Up
Jump to: