Better external Python calls from ScratchGPIO8dev
I’ve improved calling external Python scripts from ScratchGPIO8dev to allow for long time running programs.
This allows you to make your own mini sensor script to get some data from somewhere – your own sensors or from an Internet source and feed the values back into Scratch as sensor values.
I’m using this technique for my ISS Tracker Robot Arm project
To start data sensing I call this block
which calls this Python Script
to send ISS Altitude, Direction and Distance into my Scratch script
ScratchGPIO only handles one such process per program at the moment do don’t try and call 2 running processes.
Behind the scenes, ScratchGPIO will attempt to kill any previous launched external script but if you change the name of your script then you yourself should manually kill the old process