mirror of
https://github.com/dbisu/pico-ducky.git
synced 2026-01-21 09:15:59 +00:00
Compare commits
2 Commits
board-desi
...
no_mouse
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e6de3e98dc | ||
|
|
018fce3592 |
4
boot.py
4
boot.py
@@ -1,6 +1,10 @@
|
||||
from board import *
|
||||
import digitalio
|
||||
import storage
|
||||
import usb_hid
|
||||
|
||||
usb_hid.disable()
|
||||
usb_hid.enable((usb_hid.Device.KEYBOARD,))
|
||||
|
||||
noStorageStatus = False
|
||||
noStoragePin = digitalio.DigitalInOut(GP15)
|
||||
|
||||
@@ -14,6 +14,8 @@ from adafruit_hid.keycode import Keycode
|
||||
#from keyboard_layout_win_LANG import KeyboardLayout
|
||||
#from keycode_win_LANG import Keycode
|
||||
|
||||
import supervisor
|
||||
|
||||
import time
|
||||
import digitalio
|
||||
from board import *
|
||||
@@ -101,9 +103,14 @@ def parseLine(line):
|
||||
kbd = Keyboard(usb_hid.devices)
|
||||
layout = KeyboardLayout(kbd)
|
||||
|
||||
# turn off automatically reloading when files are written to the pico
|
||||
supervisor.disable_autoreload()
|
||||
|
||||
# sleep at the start to allow the device to be recognized by the host computer
|
||||
time.sleep(.5)
|
||||
|
||||
led.value = True
|
||||
|
||||
|
||||
def getProgrammingStatus():
|
||||
# check GP0 for setup mode
|
||||
@@ -187,3 +194,9 @@ if(progStatus == False):
|
||||
print("Done")
|
||||
else:
|
||||
print("Update your payload")
|
||||
|
||||
while True:
|
||||
time.sleep(1.0)
|
||||
led.value = False
|
||||
time.sleep(1.0)
|
||||
led.value = True
|
||||
|
||||
Reference in New Issue
Block a user