mirror of
https://github.com/dbisu/pico-ducky.git
synced 2026-01-21 09:15:59 +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.
|
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
|
### Setup mode
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ import supervisor
|
|||||||
|
|
||||||
import time
|
import time
|
||||||
import digitalio
|
import digitalio
|
||||||
|
from digitalio import DigitalInOut, Pull
|
||||||
|
from adafruit_debouncer import Debouncer
|
||||||
from board import *
|
from board import *
|
||||||
import pwmio
|
import pwmio
|
||||||
|
|
||||||
@@ -129,7 +131,7 @@ time.sleep(.5)
|
|||||||
led_pwm_up(led)
|
led_pwm_up(led)
|
||||||
|
|
||||||
#init button
|
#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_pin.pull = Pull.UP # turn on internal pull-up resistor
|
||||||
button1 = Debouncer(button1_pin)
|
button1 = Debouncer(button1_pin)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user