fixed quit to launcher

This commit is contained in:
thirdr 2023-01-24 15:03:55 +00:00 committed by Phil Howard
parent de8ed26460
commit 6e44434e7d
2 changed files with 0 additions and 35 deletions

View File

@ -1,8 +1,6 @@
import badger2040w as badger2040
from badger2040w import WIDTH
import time
import network
import machine
TEXT_SIZE = 1
LINE_HEIGHT = 16
@ -11,24 +9,6 @@ LINE_HEIGHT = 16
display = badger2040.Badger2040W()
display.led(128)
# Button handler
def button(pin):
time.sleep(0.01)
if not pin.value():
return
if button_a.value() and button_c.value():
machine.reset()
# Setup buttons
button_a = machine.Pin(badger2040.BUTTON_A, machine.Pin.IN, machine.Pin.PULL_DOWN)
button_c = machine.Pin(badger2040.BUTTON_C, machine.Pin.IN, machine.Pin.PULL_DOWN)
button_a.irq(trigger=machine.Pin.IRQ_RISING, handler=button)
button_c.irq(trigger=machine.Pin.IRQ_RISING, handler=button)
# Connects to the wireless network. Ensure you have entered your details in WIFI_CONFIG.py :).
display.connect()
net = network.WLAN(network.STA_IF).ifconfig()

View File

@ -1,6 +1,5 @@
import badger2040w as badger2040
from badger2040w import WIDTH
import time
import machine
from urllib import urequest
import gc
@ -26,17 +25,6 @@ display = badger2040.Badger2040W()
display.led(128)
display.set_update_speed(2)
# Button handler
def button(pin):
time.sleep(0.01)
if not pin.value():
return
if button_a.value() and button_c.value():
machine.reset()
# Setup buttons
button_a = machine.Pin(badger2040.BUTTON_A, machine.Pin.IN, machine.Pin.PULL_DOWN)
button_b = machine.Pin(badger2040.BUTTON_B, machine.Pin.IN, machine.Pin.PULL_DOWN)
@ -44,9 +32,6 @@ button_c = machine.Pin(badger2040.BUTTON_C, machine.Pin.IN, machine.Pin.PULL_DOW
button_down = machine.Pin(badger2040.BUTTON_DOWN, machine.Pin.IN, machine.Pin.PULL_DOWN)
button_up = machine.Pin(badger2040.BUTTON_UP, machine.Pin.IN, machine.Pin.PULL_DOWN)
button_a.irq(trigger=machine.Pin.IRQ_RISING, handler=button)
button_c.irq(trigger=machine.Pin.IRQ_RISING, handler=button)
def read_until(stream, char):
result = b""