Hi does anyone know where I can download and how to install control for GPIO on the weeze scratch?
Its so much fun to use scratch but its kinda limited to visual efect only, Id like to use it for comunication with the outside world.
Hi does anyone know where I can download and how to install control for GPIO on the weeze scratch?
Its so much fun to use scratch but its kinda limited to visual efect only, Id like to use it for comunication with the outside world.
Scratch 2.0 allows you to interact with the outside world via www.scratch.mit.edu . I think. I'm not sure.
So where do I download it exactly?
So where do I download it exactly?
Scratch 2.0 isn't something you download, you just run it online,
by clicking on "try it out" in the upper left.
A lot of useful work has been done by cymplecy (a teacher in the uk) into using Scratch on the Raspberry Pi to control the GPIO. Follow his instructions and you should be up and running fairly quickly.
http://cymplecy.wordpress.com/2013/04/22/scratch-gpio-version-2-introduction-for-beginners/
Make sure that you have updated to the latest version of Raspbian (sudo apt-get update; sudo apt-get upgrade) as Scratch has been patched to improve performance and to fix some annoying bugs that were present in the earlier versions.
Scratch 2.0 is not particularly useful as it doesn't run on the pi (its a web based application) and it cant access the GPIO.
Hope this helps.
I checked this out and I cant seem to install it it shows file or path not found or sintax error when I try the sudo /boot/install instruction like the page describes.
Do you know how to download it correctly because the instructions on the page arent working.
It looks like the first command in the instructions did not work. If had worked then there would be a file called install_scratch_gpio2.sh in the /boot/ directory, the error you are getting indicates that this file may not be there. Here are some instructions that may help
First - check that your raspberry pi is able to access the internet: Open an LX Terminal window and type the command:
ping www.google.com
If this returns messages starting with the text "64 bytes from ...." then you are connected and the networking is working type Ctrl and C together to stop the ping command.
If you do not get the message this will need to be fixed before anything else will work.
still in the LX Terminal window enter the following command (all on one line):
sudo wget https://dl.dropbox.com/s/oql4qzm8jlnsbeb/install_scratch_gpio2.sh -O /boot/install_scratch_gpio2.sh
If this works you should 16 lines of information appearing in the LX Terminal box.
Resolving dl.dropbox.com (dl.dropbox.com)... 23.23.110.193
Connecting to dl.dropbox.com (dl.dropbox.com)|23.23.110.193|:443... connected.
HTTP request sent, awaiting response... 302 FOUND
Location: https://dl.dropboxusercontent.com/s/oql4qzm8jlnsbeb/install_scratch_gpio2.sh [following]
--2013-07-03 21:00:49-- https://dl.dropboxusercontent.com/s/oql4qzm8jlnsbeb/ins tall_scratch_gpio2.sh
Resolving dl.dropboxusercontent.com (dl.dropboxusercontent.com)... 54.225.155.209
Connecting to dl.dropboxusercontent.com (dl.dropboxusercontent.com)|54.225.155.209|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 134445 (131K) [text/x-sh]
Saving to: `/boot/install_scratch_gpio2.sh'
100%[=================================================================================>] 134,445 80.7K/s in 1.6s
2013-07-03 21:01:00 (80.7 KB/s) - `/boot/install_scratch_gpio2.sh' saved [134445/134445]
This confirms that the file has been downloaded from cymplecy's dropbox into your /boot/ directory.
Still in the LX Terminal window enter the command:
sudo /boot/install_scratch_gpio2.sh
If all is well you should see an icon called ScratchGPIO 2 appear on the desktop and you should be good to go.
So being able to enter the internet on midory does not mean that I have internet connection? because I even tried with midory to download the file and it shows the file saved but the same error and I dont see any line after entering the line you indicated.
If you have managed to get the file through Midori then your networking setup is ok. I am not sure why the wget command does not work for you but in this case you can use Midori to download the file - however it will need at least one more step to allow it to be executed.
By default Midori will save the file in the directory /home/pi rather than the /boot/ directory that Simon's wget command uses as its target location. This is not a problem as long as we take it into account when trying to execute the file. What will be a problem is that the file wont have execute permissions so if you try to execute it with the command sudo /home/pi/install_scratch_gpio2.sh it will report no file found.
To fix the permissions open a LS Terminal window and run the command:
chmod /home/pi/install_scratch_gpio2.sh
Run the command:
ls -l /home/pi/install_scratch_gpio2.sh
If this returns "-rwxr-xr-x 1 pi pi 134445 Jul 4 08:08 install_scratch_gpio2.sh" (ignoring differences in the date and time elements which will obviously be different for you) then the file is present on your system and the permissions have been set to allow the file to be executed.
Running the command
sudo /home/pi/install_scratch_gpio2.sh
should result in some text saying that the Self Extracting Installer is extracting seven files (blink11.py, blink11.sb, GPIOexample.sb, installer.sh , rsc.sb, scratchgpio2.desktop and scratch_gpio_handler2.py). It will then run the installer.sh file which wil show the Home Directory (/home/pi), User (pi) and Group (pi) and finally it will say its finished.
If you see that you should also see the new ScratchGPIO 2 icon on the desktop.
Hi Neil,
I followed these steps, and still having problems.
When execute the shortcut on the desktop appears an error, that says:
Failed to execute child process "./simplesi_scratch_handler/scratch_gpio2.sh" (No such file or directory).
Do you know what that mean?
Thanks in advance.
Regards,
Marcelo
Hi Marcelo,
That message means that the desktop shortcut cannot find the shell script that should have been created in the directory /home/pi/simplesi_scratch_handler .
In a LX Terminal window go to the directory where install_scratch_gpio2.sh is located. this will either be in /boot if you used the wget command or in /home/pi if you downloaded the file using Midori. then run the command:
sudo ./install_scratch_gpio2.sh
Watch the output and check if there are any errors if there are then make a note of them and let me know.
If there are none shown then try clicking again on the ScratchGPIO2 icon.
Neil