Hi there @LucasAmos, great question.
There have been some attempts in this space previously.
First, have a read of this thread to learn more about activating GPIO pins.
Next, this sample code from @tjoen might be what you’re looking for.
Do let us know how you go!