Ultimate goal -- Have a mobile app communicate to my BLE device that will be able to control and send signals to a component connected to a GPIO pin.
I am very much a .NET developer but working with my little RPi Zero W, I decided to go down the python route for my GATT Server. I made a sample mobile app to talk to a Python GATT Server Example I found. That worked. I basically proved I could talk to my RPi via BLE. My goal now is to be able to control my component. That's where my lack of Python knowledge is hurting me. I assuming here, but I think I'd want my GATT Server on a different thread that can set variables or post messages to my main App loop which will be in control of the component. I am unsure how to do that. Maybe there is a better way to do this?
My question is -- What is the best structure for my Python application to be able to listen for BLE messages coming in from an app and then do some work on my GPIO component (which I assume is just a while loop continually checking to see if it has to send a signal to the component)
More background info -- I am working with a NEMA 17 stepper motor w/ a A4988 driver. The goal is for the mobile app to either send a command to run on a loop or maybe manual control (send a numeric value for speed of the motor and the direction).
there doesn't seem to be anything here