-
Hi, This is the part of my code about it :
Any help would be much appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 8 replies
-
Is there any reason why uint8 input can't be used? Just set the range from 0 to 99 |
Beta Was this translation helpful? Give feedback.
-
As I'm not using the rollover (strange for a light to bright from max to 0), this is what I did.
|
Beta Was this translation helpful? Give feedback.
-
And glad to your help I think I've a better understanding of your library, and coding in general (I'm a true beginner :). so thank you again ! |
Beta Was this translation helpful? Give feedback.
Unfortunately it is a little bit more complicated, because you need to consider some edge cases like 100.0 --> 0.0 rollover.
I created a full example here: https://github.com/olikraus/u8g2/blob/master/sys/arduino/u8g2_page_buffer/MUIFractionSimpleRotary/MUIFractionSimpleRotary.ino
The increment case for example is here:
u8g2/sys/arduino/u8g2_page_buffer/MUIFractionSimpleRotary/MUIFractionSimpleRotary.ino
Lines 414 to 429 in 9cc8dbc