NB Only available in dev version
For a while I’ve wanted one computer running a Traffic Light program to easily talk to a Pi running as robot vehicle so that the robot can respond easily to the traffic light sequence.
And extending this to another robots crossing the lights as vehicles or pretend pedestrians!
Link is used to setup connection to any other computer running Scratch with Remote Sensor Connections (RSC) enabled. (All ScratchGPIO instances running on Pi are and it can be simply enabled on other computers by users)
Then simply, prefix any broadcasts that you want to send to the other computer with Send. The other computer will receive the broadcast without the Send prefix e.g Stop or Go
Ideas to enhance/change
Let Link work with just last octet of IP (ie. assume on the same LAN and automatically determine first 3 octets. (easy)
Try and come up with using last 4 digits of serial num like SID uses (hard)
Or something to make it less geeky if possible (hard)
Add a prefix/identifier to the broadcast so that receiving computer can identify/filter/differentiate non-local broadcasts (to prevent advanced Scratchers from taking control of a remote Scratch device without permission and make it possible to have more 1 computer sending messages into a remote computer)
The code is in the dev version (but liable to change) but please have a play and pass on your ideas/thoughts
Please remember my target audience are 7-11 year olds and their teachers 🙂