Hi,
If just started using Anvil in combination with a Raspberry Pi and a whole new world of possibilities has opened!
I’m not a hardcore programmer, so perhaps the question I’m about to ask is a really easy one to answer.
So with Anvil I want to control the speed, direction and status of a stepper motor which is connected to the Raspberry Pi.
After reading to the documentation and seeing a couple of tutorials, I got it working! There is only one big bug remaining: I cannot stop the motor while it is running.
In Anvil, I control the on/off of the motor using a checkbox (AAN/UIT on photo)
In the Raspberry Pi, i make a pulsed output using a for-loop: after 1000 pulses, the motor will stop.
I want to make a interrupt (break) on the end of the for-loop, based on the status ‘cb_status_motor’ which I requested earlier.
Is it possible to call back for the variable in Anvil, so to do a request to the Anvil server from the Raspberry Pi? Are is it breaking the server-client rule?
Hope this is clear!
Kind regards,
Jan