mirror of
https://github.com/dbisu/pico-ducky.git
synced 2025-12-06 02:41:45 +00:00
Fix library includes and GPIO names (#93)
This commit is contained in:
@@ -30,11 +30,13 @@ Install and have your USB Rubber Ducky working in less than 5 minutes.
|
||||
|
||||
5. Navigate to `lib` in the recently extracted folder and copy `adafruit_hid` to the `lib` folder in your Raspberry Pi Pico.
|
||||
|
||||
6. Click [here](https://raw.githubusercontent.com/dbisu/pico-ducky/main/duckyinpython.py), press CTRL + S and save the file as `code.py` in the root of the Raspberry Pi Pico, overwriting the previous file.
|
||||
6. Copy `adafruit_debouncer.mpy` and `adafruit_ticks.mpy` to the `lib` folder in your Raspberry Pi Pico.
|
||||
|
||||
7. Find a script [here](https://github.com/hak5darren/USB-Rubber-Ducky/wiki/Payloads) or [create your own one using Ducky Script](https://github.com/hak5darren/USB-Rubber-Ducky/wiki/Duckyscript) and save it as `payload.dd` in the Pico.
|
||||
7. Click [here](https://raw.githubusercontent.com/dbisu/pico-ducky/main/duckyinpython.py), press CTRL + S and save the file as `code.py` in the root of the Raspberry Pi Pico, overwriting the previous file.
|
||||
|
||||
8. Be careful, if your device isn't in [setup mode](#setup-mode), the device will reboot and after half a second, the script will run.
|
||||
8. Find a script [here](https://github.com/hak5darren/USB-Rubber-Ducky/wiki/Payloads) or [create your own one using Ducky Script](https://github.com/hak5darren/USB-Rubber-Ducky/wiki/Duckyscript) and save it as `payload.dd` in the Pico.
|
||||
|
||||
9. Be careful, if your device isn't in [setup mode](#setup-mode), the device will reboot and after half a second, the script will run.
|
||||
|
||||
### Setup mode
|
||||
|
||||
|
||||
@@ -18,6 +18,8 @@ import supervisor
|
||||
|
||||
import time
|
||||
import digitalio
|
||||
from digitalio import DigitalInOut, Pull
|
||||
from adafruit_debouncer import Debouncer
|
||||
from board import *
|
||||
import pwmio
|
||||
|
||||
@@ -129,7 +131,7 @@ time.sleep(.5)
|
||||
led_pwm_up(led)
|
||||
|
||||
#init button
|
||||
button1_pin = DigitalInOut(board.IO22) # defaults to input
|
||||
button1_pin = DigitalInOut(GP22) # defaults to input
|
||||
button1_pin.pull = Pull.UP # turn on internal pull-up resistor
|
||||
button1 = Debouncer(button1_pin)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user