Hi all,
Hoping someone will be kind enough to help me with a vario project I have made of another persons sketch/design. Pro Mini 5v 16MHz, Nokia 5510, rotary encoder. The problem is with 5110 BL, the action of the light, off to brightest needs to be inverted. The BL in on when display says it should be off.
display/BL
Off is brightest
1
2
3
4 is least bright
5 is off
Sequence repeats with cw rotation of encoder.
I want display order and cw repeat sequence of rotary encoder to remain the same, just need action of BL itself inverted to match display. Any help much appreciated, thanks Davo
case MENU_LIGHT:
{
conf.light_cpt = updateConfItem(conf.light_cpt, dir, -1);
if (conf.light_cpt <= 0)
conf.light_cpt = 0;
if (conf.light_cpt >= 5) {
conf.light_cpt = 5;
display.print(F("Off"));
}
else {
display.print(5 - conf.light_cpt);
}
updateBrightness();
}
break;