ScA (Scratch controlling Arduino)

Following on ScratchGPIO for the Raspberry Pi, I want to achieve the same end result with Scratch and a Arduino/Shrimp.  This is to give the same end result (Scratch interfacing with LEDs,switches, sensors etc.) but at much lower cost per classroom workstation.

I have continued to use  Scratch 1.4 to maintain documentation/scripts/codebase compatibility with ScratchGPIO on the Raspberry Pi

At the moment, the project is being re-written and only deals with digital output pins siwthcing them on/off

How to setup your computer to do this

You need a Windows PC (tested on an XP and Windows 7 and an Arduino Uno (It may work with other types but not tested).

  • Install Main Arduino code and get your Arduino driver up and working (or your Shrimp Driver if using one instead)
  • Start the standard Arduino program and upload the StandardFirmata sketch from Examples -> Firmata -> StandardFirmata.

    (If you want to check that this bit is working download  http://www.firmata.org/wiki/Main_Page#Firmata_Test_Programt , slect you com port and see if you can switch Pin13 on/off.

  • Download and run my ScA program.

    It should run and identify which serial com port your Arduino is connected to.

Using ScA

  • Run ScA (if not already running)
  • Launch Scratch and enable Remote Sensor Connections by
    right-clicking on the () Sensor Value block, found in the sensing category and then selecting the “Enable remote sensor connections” option.

You should now be able to blink the Arduino on-board LED by running the following simple Scratch script

When Green Flag is pressed
forever


broadcast pin13on
wait 1
broadcast pin13off
wait 1

to get yourself a blinking LED

 

 

One thought on “ScA (Scratch controlling Arduino)

  1. Hi,
    I’m also working on s2a_fm to control Arduino board, helping to translate and contribute. We’re trying to develop for STEM French teacher educational material using it, no more time for Raspberry :-/
    But I just discovered your program, it works fine, but when I launch it on Windows it runs 3 time : the first one close after detecting the Arduino board, launch itself 2 more time and the third one works well…

    How can we use it with Scratch2 ?

    Thanks a lot for your wokr.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s