GoGo Scratch is a modified version of the popular MIT Scratch programming environment that allows you to control the GoGo Board (or PiTopping board). It essentially adds motor control blocks and sensor input reporters to the original Scratch environment.
Installation
Step 1: Install prerequisites
$sudo apt-get update $sudo apt-get install cmake libglu1-mesa-dev libasound2-dev libpulse-dev uuid-dev libffi-dev libogg-dev libvorbis-dev libspeex-dev libfreetype6-dev libpango1.0-dev libxml2-dev libgstreamer0.10-dev $sudo apt-get install build-essential pkg-config $sudo apt-get install libglib2.0-dev libpango1.0-dev libcairo2-dev libv4l-dev
Step 2: Remove the default Squeak VM and Scratch
Unfortunately, the default Squeak VM required to run Scratch does no work with GoGo Scratch. We need to down-grade the VM from version 4.4 to version 4.0.2. Please follow these steps
$sudo apt-get remove scratch $sudo apt-get remove squeak-vm
Step 3: Configure the serial port
GoGo Scratch communicates with the GoGo Board or the PiTopping board through the built-in serial port. However, this serial port is used for other things by Raspbian. So, we need to disable them.
Edit /boot/cmdline.txt. The file will look something like this:
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
Remove all references to ttyAMA0. So, for the example above /boot/cmdline.txt, should contain:
dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
Edit /etc/inittab. Search for the following lines
#Spawn a getty on Raspberry Pi serial line T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100
Comment out the second line.
#T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100
Restart the Raspberry Pi
Step 4: Get the pre-compiled alternate squeak vm and install
cd /home/pi wget http://files.e-cpe.org/gogoscratch/raspberry%20pi/Squeak-4.0.2.2181-pre-compiled.tar.gz tar -xzvf Squeak-4.0.2.2181-pre-compiled.tar.gz cd Squeak-4.0.2.2181-src/bld sudo make install sudo cp -f -r /usr/local/lib/squeak /usr/lib/squeak
Note: This pre-compiled version of Scratch must be copied to the folder specified above. Otherwise, the command “sudo make install” will cause and error.
Step 5: Get GoGo Scratch and install
cd /home/pi mkdir scratch cd scratch wget http://files.e-cpe.org/gogoscratch/raspberry%20pi/gogoscratch_beta3.tar.gz tar -xzvf gogoscratch_beta3.tar.gz sudo ./scratch_install.sh . cd Plugins sudo cp ScratchPlugin /usr/lib/scratch/plugins/so.ScratchPlugin
You should see the Scratch icon on the desktop. Enjoy!