Hello,
I've got 5 LED's and a potentiometer. As I roll the pot, I want an LED to come on if the pot's value is within a certain range. All of my grounds are going to a common ground, LED's are in D1-D6, pot is in A0. I'm not getting any compile errors. The current behavior is on boot, LED 1 comes on and when I move the pot, LED 1 stays on and none of the others come on.
Any ideas?
When I turn the pot, the other LED's turn on, however, my first LED is still constantly on. Not sure why because I'm setting it to LOW in the if statements.
AWOL - I have seen the map function. Is that required for this example to work?
@PaulS - I'm doing this on an Ardweeny so I didn't see that 'tx' label that's right there on my mega. Thank you! @AWOL - cool, I looked at the map method and I'll see how I can utilize this to my advantage. Shorter in the fact that I could minimize my if statements? I'll try to find some examples. Thanks again for your help.