Learn how to use our Python/Scratch listener to control your robot via Scratch
Scratch can be used to control SMARS robots, however there are a few caveats: Only Scratch 1.4 can send messages to external devices, and sensing isn't working yet (but will be soon!).
There are 3 parts: The SMARS Quad itself, a computer running Scratch 1.4 and the SMARS Raspberry Pi Zero running the Python ScratchListener.py program. The ScratchListener program listens out for broadcast messages from the computer running Scratch 1.4. These messages can be:
On the raspberry pi, type:
git clone https://www.github.com/kevinmcaleer/smars
To Run the scratchlistener.py on the SMARS raspberrypi zero, type:
A prompt will ask for the IP address of the computer running the Scratch Script, don't fill that out just yet (or it will report an error about the host refusing the connection)
Run Scratch 1.4 on a computer (and this doesn't have to be the SMARS raspberry pi)
Load the Scratch SMARS Demo program
Type the IP address of the computer running scratch 1.4 into the ScratchListener.py program
Click run on the Scratch program, that's the litte green flag icon.
Control the SMARS quad in Scratch using the keys W, S, Up arrow, Down arrow, Left arrow, Right arrow
Controlling a SMARS Quad Robot with Scratch and Python.