Hi Guys,
Got an Arduino Nano yesterday, so first question to the Forum.
Can I increase/decrease the value of an LED using a float ie -
float fadeValue = 255;
analogWrite(ledPin, fadeValue);
fadeValue = fadeValue - .2
I used Serial.print to see what values were being passed to the ledPin, and everything seems to be OK and the value was decreasing by .2, but the fade doesnt seem to be any smoother (just takes longer).
Unsure of the internal working of an Arduino, but, Is it only implementing the value when it gets to an integer.
The only reason I wanted to do this, was because, as the LED got dimmer, the dimming steps became noticeable.
BTW im using fade without Delay() to dim the LED, got other things going on that cant be disrupted.