I have coded a [very] simple progress bar for use with an oLED display. The bar itself is not 'realtime', but it is threaded with an upload function so it simply repeats untill that function is finished.
Currently it uses the '|' character to display the progress and repeats 30 times at an increment(offset) of 1 pixel each time.
I wish to be able to repeat the character with more than a 1 pixel increment (offset) in order to be able to use different characters (such as '#' for example) that wont overlap.
Here is the current code:
Code: Select all
def oledProgressBar (x,y):
for i in range(30):
x1 = x
x2 = x1 + i
led.draw_text3(x2,y,"|",font)
led.display()
time.sleep(0.1)
led.clear_block(90,50,128,39)
led.display()
pass
Code: Select all
x2 = x1 + i+5
Cheers
Mark