1
Cool and thanks for update henryg.
Also, would it be possible to have a v1.1 for the uf2 single install please?
Also, would it be possible to have a v1.1 for the uf2 single install please?
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
import thumby
thumby.display.setFPS(2) # frames per second
brightness = 127
colour = 0 # black
torch = 1 # white 'ON'
blink = 0
while(not(thumby.buttonA.pressed() and thumby.buttonB.pressed())):
if thumby.buttonA.justPressed():
torch = 1
if thumby.buttonB.justPressed():
torch = 0
if thumby.buttonL.pressed():
blink = 0
torch = 1
if thumby.buttonR.pressed():
blink = 1
torch = torch
if blink == 1:
torch = not(torch)
thumby.display.fill(torch) # fill screen with pixels
if torch > 0:
if thumby.buttonU.pressed():
#colour = 1
if brightness <= 120:
brightness += 7
thumby.display.drawText("increasing", 6, 4, colour)
thumby.display.drawText("%d" % brightness, 6, 20, colour)
thumby.audio.playBlocking(brightness * 7,42)
if thumby.buttonD.pressed():
#colour = 0
if brightness > 8:
brightness -= 7
thumby.display.drawText("decreasing", 6, 4, colour)
thumby.display.drawText("%d" % brightness, 6, 20, colour)
thumby.audio.playBlocking(brightness * 7,42)
thumby.display.brightness(brightness)
thumby.display.update()