Using Scratch controlling Raspberry Pi GPIO Remotely

This information is largely superceded by the SID post http://cymplecy.wordpress.com/2013/08/03/use-your-raspberry-pi-as-a-wi-fi-scratch-interface-device/ but is still useful for experimentation

One thing that I’d completely forgotten about is that the Scratch GPIO handler program can be run with a parameter of an LAN IP address.

What this means is that you can run Scratch on your desktop of your PC/Mac/Linux machine or even another Raspberry Pi and write you code on that and get it to control the GPIO pins on your Raspberry PI remotely.

These instructions are not for beginners

basicaly

run a LX terminal session on your RPi

sudo python simplesi_scratch_handler/scratch_gpio_handler2.py 192.168.1.73

(replace 192.168.1.73 with your main computer IP address)

Your Pi will then listen for broadcasts from your main computer and you can simply run Scratch on yoru main computer, enable Remote Sensor Connections and then your Pi will pick up any broadcasts/variable changes that you make on your main computer

You may also like...

1 Response

  1. Seth says:

    When I run the command I get this error:

    from: can't read /var/mail/array
    simplesi_scratch_handler/scratch_gpio_handler2.py: 9: simplesi_scratch_handler/scratch_gpio_handler2.py: import: not found
    simplesi_scratch_handler/scratch_gpio_handler2.py: 10: simplesi_scratch_handler/scratch_gpio_handler2.py: import: not found
    simplesi_scratch_handler/scratch_gpio_handler2.py: 11: simplesi_scratch_handler/scratch_gpio_handler2.py: import: not found
    simplesi_scratch_handler/scratch_gpio_handler2.py: 12: simplesi_scratch_handler/scratch_gpio_handler2.py: import: not found
    simplesi_scratch_handler/scratch_gpio_handler2.py: 13: simplesi_scratch_handler/scratch_gpio_handler2.py: import: not found
    simplesi_scratch_handler/scratch_gpio_handler2.py: 14: simplesi_scratch_handler/scratch_gpio_handler2.py: import: not found
    simplesi_scratch_handler/scratch_gpio_handler2.py: 16: simplesi_scratch_handler/scratch_gpio_handler2.py: import: not found
    simplesi_scratch_handler/scratch_gpio_handler2.py: 17: simplesi_scratch_handler/scratch_gpio_handler2.py: Syntax error: word unexpected (expecting ")")
    

    It’s mind boggling.

Leave a Reply

Your email address will not be published.