Pi2 Issues

Update 22:34:00 Wed 18 Mar 2014

Hopefully ScratchGPIO7 is now fully compatible with all PI models including the 2B – please let me know if you think this isn’t true


Update 22:34:00 Sun 1 Mar

We were all caught by surprise when the Pi2 was launched and I expect it will take a few  weeks to get things back on an even keel.

At the present time, standard ScratchGPIO7 does work with the Pi2  – at least switch pins off and on.

To get support for any issues that you may be having please make sure your system is up to date by opening LX Terminal and typing

sudo apt-get update

sudo apt-get upgrade

sudo apt-get dist-upgrade

before asking for help


To get I2C type add-ons (Such as the PiGlow) you need to add these lines to the end of /boot/config.txt


(Launch LX Terminal – type sudo leafpad /boot/config.txt

and paste those lines in)

Following some great co-operation between 4Tronix and Richard Hirst, Richard has not only modified servo-blaster to provide servo support for the 2B but has managed to get NeoPixels working again.  I’m just testing this out using the Pimoroni unicorn hat package anit it basically works but has memory leak at moment

I’m testing other add-on boards to see if I can get them working as well.


The best place to get support is to register on

www.edugeek.net and post a question in






You may also like...

18 Responses

  1. Mike Cook says:

    It will not install on doing the:-
    sudo bash isgh7.sh
    It reports
    isgh7.sh: line 1: –2015-04-29: command not found
    isgh7.sh: line 2: syntax error near unexpected token `(‘
    isgh7.sh: line 2: `Resolving bit.ly (bit.ly)…,’

  2. Tim Richter says:


    I am interested in using Scratch as an interface to the Raspberry Pi. It looks like you have done a lot of work in this space. I am hoping to build my first expansion board that shortly – this will tie directly into the RPi GPIO and I would be able to use your library directly. However, in the future, I am interested in building a proprietary expansion system that would work over SPI or I2C.

    Two questions- would you be interested in contributing to this effort? Obviously, we don’t know anything about each other, but perhaps there is an opportunity for collaboration. Second, is your code available for license or reuse?


    • cymplecy says:

      I’m not interested in propriatey systems – my work is intended to be used by primary age children adn their teachers.

      All the code is on Github but I’m a very messy programmer 🙂

      I’d just point out that Pirmoroni are about to launch their Flotilaa range very shortly that is also I2C based


  3. Welshmark says:

    I have installed Scratch on my Pi model B. It has installed fine but will not run the Blink11 but I can get python to blink the same led on the same pin. I run scratch in terminal and this is what I got.
    pi@raspberrypi ~ $ Executing: /usr/lib/squeak/4.10.2-2793/squeakvm -encoding UTF-8 -vm-display-x11 -xshm -plugins /usr/lib/scratch/plugins/:/usr/lib/squeak/4.10.2-2793/ -vm-sound-alsa /usr/share/scratch/Scratch20131203.image /home/pi/Documents/Scratch Projects/rsc.sb
    meArm NOT imported OK
    MCP23008 imported OK
    sgh_MCP230xx NOT imported OK
    Not imported OK
    PWM/Servo NOT imported OK
    ADC/DAC NOT imported OK
    8×8 NOT imported OK
    nunchuck not imported – check I2c is setup
    Minecraft imported OK
    Traceback (most recent call last):
    File “scratchgpio_handler7.py”, line 6081, in
    sghGC = sgh_GPIOController.GPIOController(True)
    File “/opt/scratchgpio7/sgh_GPIOController.py”, line 45, in __init__
    self.piRevision = self.getPiRevision()
    File “/opt/scratchgpio7/sgh_GPIOController.py”, line 36, in getPiRevision
    AttributeError: ‘module’ object has no attribute ‘RPI_INFO’

    I already did
    sudo apt-get update
    sudo apt-get upgrade
    sudo apt-get dist-upgrade

    but it made no difference. Any ideas where I go from here?

    Many Thanks


    • cymplecy says:

      Well – the implication of that error message is that you do not have an uptodate version of the RPi-GPIO library 🙁

  4. Welshmark says:

    Thanks for your reply

    Python works fine and when I ran this

    pi@raspberrypi ~ $ sudo apt-get install python-rpi.gpio python3-rpi.gpio

    I got this output, which suggests that it is all up to date. Or am I missing something stupid? I’m very new to this.
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    python-rpi.gpio is already the newest version.
    python3-rpi.gpio is already the newest version.
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

  5. welshmark says:

    Its OK now I think i got to the bottom of it. I had to use pip to upgrade.

    Thanks for your help


    • cymplecy says:

      Phew 🙂

      What did you do to get it working exactly (just to help anyone else with same problem)


  6. welshmark says:

    Originally I used APT to prform the update and upgrade but this didnt update RPi-GPIO to the latest version. After a bit of hunting around regarding this I found that you would have to use PIP to update RPi-GPIO, that worked. When I get home I’ll try to retrace my steps and provide better instructions.

  7. SC says:

    I had this issue and I used information from this site to solve it:

    You will need to execute pip install with -U to upgrade Libs

    $ sudo pip install -U hg+http://hg.code.sf.net/p/raspberry-gpio-python/code#egg=RPi.GPIO
    $ sudo pip-3.2 install -U hg+http://hg.code.sf.net/p/raspberry-gpio-python/code#egg=RPi.GPIO

  8. SC says:

    You are welcome 🙂
    The problem I am having now is that if I run motorTest2.py script wheels are turning in the right direction when I user up and down arrow but if I use scratch and motorTestB project they turns in opposite direction.
    Example set MotorA to 100 – will turn wheels backward 🙂

  9. SC says:

    It is 4tronix Initio with Raspberry PI 2, PiRoCon V2 and IBoos64

  10. SC says:

    I can see those two errors during the initial scratch init

    Error accessing device at address 0x70 and Error accessing device at address 0x40 below is the log

    pi@raspberrypi ~ $ /opt/scratchgpio7/scratchgpio7plus.sh
    pi@raspberrypi ~ $ Executing: /usr/lib/squeak/4.10.2-2793/squeakvm -encoding UTF-8 -vm-display-x11 -xshm -plugins /usr/lib/scratch/plugins/:/usr/lib/squeak/4.10.2-2793/ -vm-sound-alsa /usr/share/scratch/Scratch20131203.image /home/pi/Documents/Scratch Projects/rsc.sb
    meArm NOT imported OK
    MCP23008 imported OK
    sgh_MCP230xx imported OK
    Not imported OK
    PWM/Servo imported OK
    ADC/DAC imported OK
    ADAfruit Board Revision Detects: 1
    Error accessing device at address 0x70
    8×8 NOT imported OK
    nunchuck imported
    Minecraft imported OK
    RPi.GPIO Version 0.5.11
    Board Revision 3
    sghGC Debug enabled
    pi Revision 3
    PiGlow init
    i2cbus: 1
    0 1 2 3 4 5 6 7 8 9 a b c d e f
    00: — — — — — — — — — — — — —
    10: — — — — — — — — — — — — — — — —
    20: — — — — — — — — — — — — — — — —
    30: — — — — — — — — — — — — — — — —
    40: — — — — — — — — — — — — — — — —
    50: — — — — — — — — — — — — — — — —
    60: — — — — — — — — — — — — — — — —
    70: — — — — — — — —
    No PiGlow Detected
    No Compass Detected

    Error accessing device at address 0x40
    No PWM/Servo Board PCA9685 detected
    init PCF8591
    No ADC/DAC PCF8591 Detected
    No AdaMatrix Detected
    No PiMatrix Detected
    Error accessing device at address 0x20
    No MCP23017 Detected
    looking for nunchuck
    Unable to determine Raspberry Pi revision.
    No NunChuck Detected
    pi camera init
    starting at 0

    PATH: /opt/scratchgpio7

  11. Leonardo says:


    I am trying to use Scratch GPIO7 in a Raspberry Pi 2 board. Everything seems to be correctly installed, but the connection step is not working. This the execution log:

    pi@raspberrypi ~ $ /opt/scratchgpio7/scratchgpio7.sh
    pi@raspberrypi ~ $ Executing: sudo -E /usr/bin/squeak /usr/share/scratch/NuScratch15092015.image /home/pi/Documents/Scratch Projects/rsc.sb
    execing: /usr/bin/../lib/squeak/5.0-3427/squeak -vm-sound-alsa /usr/share/scratch/NuScratch15092015.image /home/pi/Documents/Scratch Projects/rsc.sb
    Version: v7.1.005
    webcam not imported
    meArm NOT imported
    sgh_MCP230xx NOT imported
    Not imported
    PWM/Servo NOT imported
    ADC/DAC NOT imported
    8×8 NOT imported
    nunchuck not imported – check I2c is setup
    RPi.GPIO Version 0.6.0a3
    Board Revision 3
    sghGC Debug enabled
    pi Revision 3
    PiGlow init
    i2cbus: 1
    pi camera init
    starting at 0
    RasPiCamera Detected
    PATH: /opt/scratchgpio7
    Starting to connect… Trying

    I execute same steps on a Raspberry Pi B+ and it worked without any problem but even spending all day trying on Raspberry Pi 2 I can’t reach same result.

    I would appreciate any help.

    • cymplecy says:

      Any problems I’ve had with cards working in B+ but not working in 2B have been sorted by putting card into B+ and doing an update

      sudo apt-get update
      sudo apt-get upgrade

      and once they are finished – put card into your 2B


Leave a Reply to cymplecy Cancel reply

Your email address will not be published. Required fields are marked *