Toggle Navigation
Hatchery
Eggs
Massage
__init__.py
Users
Badges
Login
Register
MCH2022 badge?
go to mch2022.badge.team
__init__.py
raw
Content
import color, vibra, buttons, display disp = display.open() disp.clear() disp.print("Vibrate", fg=color.WHITE, bg=color.BLACK, posx=10, posy=10) disp.print("ON", fg=color.WHITE, bg=color.BLACK, posx=10, posy=50) disp.print("OFF", fg=color.WHITE, bg=color.BLACK, posx=110, posy=50) disp.update() disp.close() while True: pressed = buttons.read( buttons.BOTTOM_LEFT | buttons.BOTTOM_RIGHT ) if pressed & buttons.BOTTOM_LEFT != 0: vibra.set(True) if pressed & buttons.BOTTOM_RIGHT != 0: vibra.set(False)