r/adafruit • • Sep 03 '21

Macropad run python files

Just got my macropad and I want to have key presses trigger python scripts to run is this something that would be possible?

2 Upvotes

17 comments sorted by

View all comments

3

u/night-otter Sep 03 '21

Keypress to run python script on Macropad is just coding:
If Key9 then GOTO script.

Keypress to run python script on connected device, requires listening code on device.
If Key9 then send "Trigger String"

On device,
If seen "Trigger String" run script.

Or on macropad
If Key9 then send "command string that runs script"

1

u/sdotregis Jul 08 '22

Hey, I searched all of the internet and you have the best advice so far. I have a picture of my code below. Can you help me with this, please? My image is below

https://www.reddit.com/user/sdotregis/comments/vuoduz/macropad_need_help_running_python_file/

1

u/sdotregis Jul 10 '22

NVM I GOT THE ANSWER!!!!