diff --git a/Pico/code.py b/Pico/code.py index 4c26b0a..8d3467c 100644 --- a/Pico/code.py +++ b/Pico/code.py @@ -60,6 +60,7 @@ # Check for input in an infinite loop while True: + # Button 0 - Page Change if button0.value: page += 1 diff --git a/Pico/lib/BoardSetup/_base.py b/Pico/lib/BoardSetup/_base.py index 7639104..f8a265e 100644 --- a/Pico/lib/BoardSetup/_base.py +++ b/Pico/lib/BoardSetup/_base.py @@ -5,6 +5,7 @@ from adafruit_hid.keyboard import Keyboard from adafruit_hid.keyboard_layout_us import KeyboardLayoutUS from adafruit_hid.mouse import Mouse +from ._drive import drive # Importing the shortened keycodes from BoardSetup._shortcodes import * @@ -14,19 +15,18 @@ text = KeyboardLayoutUS(kb) mouse = Mouse(usb_hid.devices) -# The location of the Pico storage and Scripts folder -drive = 'G:' +# The location of the Scripts folder path = '/lib/Scripts/' -# Helper function to make running scripts only a single line -def run_script(script): - kb.send(shift,ctrl,alt,insert) - wait(0.1) - print(f"exec(open('{drive}{path}{script}').read())") - # Helper function to allow running commands in the background def command(command): kb.send(shift,ctrl,alt,insert) wait(0.1) print(f"import bpy;{command}") - kb.send(left,right) \ No newline at end of file + kb.send(left,right) + +# Helper function to make running scripts only a single line +def run_script(script): + kb.send(shift,ctrl,alt,insert) + wait(0.1) + print(f"exec(open('{drive}{path}{script}').read())") diff --git a/Pico/lib/BoardSetup/_drive.py b/Pico/lib/BoardSetup/_drive.py new file mode 100644 index 0000000..bd7068c --- /dev/null +++ b/Pico/lib/BoardSetup/_drive.py @@ -0,0 +1 @@ +drive = 'G:' \ No newline at end of file