You are on page 1of 15

P

i
c
o
h
B
t
o
i
a
r
w
d
s
d
e
t
r
G etting Sta
#ONNECTREAL WORLDSENSORS
TOYOUR3CRATCHPROJECTS
light
sensor

The PicoBoard enables your Scratch (scratch.mit.edu)


projects to sense and respond to things going on in
the world outside your computer.

button
For example, using the
sound sensor, you can

slider

make a sprite change how it

sound
sensor

looks whenever there is a


loud sound.

Or, using the readings from


the PicoBoards light sensor, you
can program a Scratch sprite to hop
up and down whenever the sensor

alligator clips

You can use the


slider and button to
control a character in
a video game.

detects a passing shadow.

The PicoBoard also


comes with four sets of
alligator clips that measure
the electrical resistance
With the alligator clips

in a circuit.

you can build all kinds of


custom sensors.

For example, attach the


clips to a pair of home-made metal

The next few pages show you how to use the PicoBoard.
For information about how to get a PicoBoard, see:

bracelets and you can detect when


your wrists touch.

www.playfulinvention.com/picoboard.html
Scratch is a project of the Lifelong Kindergarten group at the MIT Media Lab
http://scratch.mit.edu/

ds
r
a
o
B
o
c
i
P
h
t
i
w
d
Getting Starte
www.playfulinvention.com/picoboa
rd.ht

ml

3TART-OVING
Try using sensor readings to
control the movement of a sprite.

Checking this box makes


a sensor watcher appear on
the stage, which lets you see the
what value the slider sensor
is reading.

sensor value blocks

Move the slider on the

give readings ranging from

PicoBoard up and down and

0 to 100.

watch the readings change.

slider

sensor watcher

With this script,


you can control the cats
vertical position with the slider.
Click on the green flag button
to start the script.
Not working?
See the Troubleshooting

Try using the slider to

section at the end of this

make the cat move up

document.

and down.

ds
r
a
o
B
o
c
i
P
h
t
i
w
d
Getting Starte
www.playfulinvention.com/picoboa
rd.ht

ml

3EEING3HADOWS
To change from the slider to another kind of
sensor, click on the triangle on the sensor value
block and select a sensor from the menu.

light sensor

click here

Select light and


check the box to make a new
sensor watcher appear on the
stage. The readings on this watcher
indicate the brightness of the light
reaching the light sensor on
the PicoBoard.

Try moving your


hand to cast a shadow on
the light sensor and see how
the readings change.

Start this script and watch

7ANTTOMAKETHE
CATMOVEMORE

the the cat move up and down as

You can use this script

the amount of light reaching the

to make the cat twice as sensitive

light sensor changes.

to changes in brightness.

ds
r
a
o
B
o
c
i
P
h
t
i
w
d
Getting Starte
www.playfulinvention.com/picoboa
rd.ht

ml

(EARING6OICES
Use a PicoBoards sound
sensor to measure how
loud a sound is.

A sound sensor
value block reports numbers

sound
sensor

from 0 to 100. The louder


the sound, the bigger

Watch your sprite

the number.

hop up and down as


you speak into the
sound sensor.
The sound sensor value
block is similar to Scratchs loudness
block; both blocks measure how
loud sounds are.

The difference is that the


loudness block uses your computers
micophone if it has one to make
measurements, while the sound sensor
value block uses the sound sensor
on the PicoBoard.

With this script, your


sprite will change its costume
each time you clap.

You can use sensor


values to control graphic
effects. Watch the cat whirl
when you blow into the
sound sensor.

ds
r
a
o
B
o
c
i
P
h
t
i
w
d
Getting Starte
www.playfulinvention.com/picoboa
rd.ht

ml

4RUEOR&ALSE
A sensor____? block reports
either true or false.

A button pressed? block


reports true when the button on
the PicoBoard is pressed,
With this script, the

false when it is not.

sprite will spin as long as


the button is pressed.

button

You can plug an alligator


clip into one of four jacks
(labelled A, B, C, and D).

The PicoBoard comes with


four pairs of alligator clips. There is
a connected? block for each pair of clips.

alligator
clips

This block reports true if there is a good


electrical connection between the
metal ends of the clips.

An A connected? block
reports true if the ends of the
alligator clips plugged into jack
A are connected.

After clicking on the


green flag, you wont hear
the drum sound until the metal
tips of the alligator clips
touch each other.

ds
r
a
o
B
o
c
i
P
h
t
i
w
d
Getting Starte
www.playfulinvention.com/picoboa
rd.ht

ml

-AKE9OUR/WN3ENSORS
The PicoBoards alligator clips can be
used to build all kinds of custom sensors.

Rhythmic Wrists
For example, if you attach the
clips to a pair of home-made metal
bracelets, you can detect when
your wrists touch.

A resistance sensor value


block reports a number from 0 to 100,
depending on how much electrical resistance
there is between the metal ends of the
alligator clips.

Musical Pom-Poms
Try attaching the clips to a moist cotton
pom-pom or piece of tissue paper.
Watch how the resistance changes
as you squeeze the pom-pom.

This script plays notes


that change pitch depending on
the resistance between the clips.
Listen to the notes change as you
squeeze the pom-pom.

ds
r
a
o
B
o
c
i
P
h
t
i
w
d
Getting Starte
www.playfulinvention.com/picoboa
rd.ht

ml

7ATCHINGALLTHE3ENSORSAT/NCE
Want to watch all the PicoBoard sensors at once? Right-click
(ctrl-click on a Macintosh) on any sensor block, then select the
show ScratchBoard watcher option. A display showing all
the sensor readings will appear on the stage. You can then drag
the ScratchBoard watcher anywhere you want.

If the ScratchBoard
watcher does not turn on,
try putting a check in the
box next to one of the

7HATELSECANYOUDOWITHTHE0ICO"OARD

sensor blocks.

Lots of things! For example:

)N

0UPPET0ERFORM
E
V
I
T
ANC
AC
R
E
E
T

Make a puppet,
using craft materials,
recycled materials,
and other stuff.
Attach aluminum foil
and position the alligator clips
so that you can sense when your
puppets arms are moving.

Use Scratch to
make a puppet show with
characters that interact with
your hand held puppet.

ds
r
a
o
B
o
c
i
P
h
t
i
w
d
Getting Starte
www.playfulinvention.com/picoboa
rd.ht

ml

4ROUBLESHOOTING
If your PicoBoard doesnt seem to be working,
open the ScratchBoard watcher, as described
on the previous page, and look for one of the
following symptoms.

To use the PicoBoard, you should be using


Scratch version 1.1 or later. You can
download the latest version of Scratch at:
http://scratch.mit.edu/download

3YMPTOM
The ScratchBoard
watcher says Off at the
top, and the readings you
see are all zero.

4HINGSTOTRY
Make sure the USB-to-serial cable and the PicoBoard
are connected to the computer.

Check for port conflicts. (Quit PicoBlocks.Turn off


PalmPilot Hotsync. Disable Bluetooth software.)

Make sure only one copy of Scratch is running.

Have the drivers for the Prolific USB-serial cable


been installed? You can download the drivers from
www.playfulinvention.com/picoboard-drivers.html

Look at the Task Bar at bottom of your Windows


screen. Make sure there is only one Scratch
window open. If there is more than one, close
(X) all the Scratch windows, then restart Scratch.

Unplug and replug the USB-serial cable. Note


that you can also use a serial-to-serial cable
the PicoBoard is not dependent upon the cable
that ships with it.
To check if USB-serial cable is properly installed,
go to Control Panel > System. Find Device Manager,
and look at Ports (COM & LPT). You should see the
Prolific USB-serial cable listed there.

Look at the Dock located along one of the edges


of your screen. Do you see more than one cat?
If so, quit from all the copies of Scratch that are
running, then restart Scratch.

Restart Scratch.
Restart your computer, then restart Scratch.
Applies to Windows users only
Applies to Mac users only

ds
r
a
o
B
o
c
i
P
h
t
i
w
d
Getting Starte
www.playfulinvention.com/picoboa
rd.ht

ml

4ROUBLESHOOTING continued...
4HINGSTOTRY

3YMPTOM

Right-click (ctrl-click on a Mac)


and select close port from the
pull-down menu.

The ScratchBoard
watcher readings are frozen;
they dont change even when
you make noise, move the
slider, etc.

Unplug and replug the


USB-serial cable.
Restart Scratch.
Restart your computer,
then restart Scratch.

3YMPTOM

4HINGSTOTRY

The entire Scratch


screen goes white and does
not respond to any mouse or
keyboard commands.

Simultaneously hold down <ctrl>, -<alt>, and <delete>


keys to open the Windows Task Manager. Then select
End Task to close Scratch. (Unforntunately, you will
lose any unsaved work in Scratch.) Then restart Scratch.
To avoid this problem, go to the Windows Control Panel
and select Power Options. Change the settings to
prevent Windows from entering standy mode.

This is a known
problem that occurs when a
Windows machine goes into
standby mode while Scratch is
communicating with a PicoBoard.
When you try to wake up the
machine, Scratch will be
in this frozen state.

3TILL3TUCK
If none of the above
solutions work, contact us at

PICOBOARD PLAYFULINVENTIONCOM
or post a question to the
Sensor Boards forum

SCRATCHMITEDUFORUMS


PicoBoard
The PicoBoard allows you to create interactions with various sensors. Using the Scratch programming language, you can
easily build simple interactive programs based on the sensors input. The PicoBoard incorporates a light sensor, sound
sensor, a button and a slider, as well as four additional inputs that can sense electrical resistance via included cables. The
guts of the PicoBoard are identical to the Arduino Uno.
Designed for educators and beginners, the PicoBoard is a good way to get into the very basics of programming and reading
sensors. Check out the PicoBoard product page for more information: https://www.sparkfun.com/products/10311
GETTING STARTED
1 Download Scratch: http://scratch.mit.edu/
INSTALL FTDI DRIVER: PART 1
1 Download FTDI Drivers. To do that, head over to the FTDI website (http://www.ftdichip.com/FTDrivers.htm).
Click Drivers on the left, and then click VCP Drivers. This stands for Virtual Com Port. Windows and Mac users
follow instructions below for your operating system. Linux users please refer to the FTDI website for more info.
Windows Instructions

Mac Instructions

Please note: These instructions are for Windows 7.


However, the process should be very similar for other
versions of Windows.

Please note: Most of the time, when you install PicoBoard on Mac
OS X, the drivers are installed automatically.

2 Now choose the setup executable link


under the Windows row.
3 There is no need to save this file. Choose
Run once it is has finished downloading.
4 If everything was successful, you should
see some nice green check marks,
indicating success!

2 Now we need to determine if you need the x86 or x64


bit version of the drivers. Click on the apple icon in the
top left of the screen, and choose About this Mac.
3 Check under Processor to see which version you have.
Follow the chart below to determine which drivers to
download.
4 Download the files from the site by clicking on the
link. Locate the .dmg file that was downloaded to your
computer, and double click on it. If you are not sure
which version of OS X you have, use the same process
as before when finding the processor type. Click on the
apple and choose About This Mac. You will then see
Version 10.X.Y use the 10.X to determine your system
version. Continue through the installation, and wait for
it to finish. Then click Close.
Page 1

INSTALL FTDI DRIVER: PART 2


1 Connect your Mini USB cables Mini-B end (the smaller side of your USB cable) to your PicoBoard.
2 Connect your Mini USB cables Type A end (the other side) to a USB port on your computer.
3 You may be prompted to install the driver for your PicoBoard once it has been plugged in. If so, follow the instructions
on your screen to finish the installation. Some older versions of Windows may prompt you to do this twice.
INPUTS ON THE PICOBOARD
INPUT DESCRIPTIONS
1
2

Slider
Change the values by sliding the knob back and forth.

Light Sensor
Measures the amount of light hitting the sensor.

Button
A button is digital input. It can be either on or off.

Sound Sensor
Measures how loud something is - use this sensor to
move your sprite based on sound!

HOW TO ADD THE ADVANCED SENSORS IN YOUR KIT TO YOUR PICOBOARD


1 Plug an alligator clip into one of the PicoBoard end connectors. There are four end connectors. They are A, B, C, or D.

CORRECT: Plugged in all the way


Page 2

INCORRECT: Not plugged in all the way

2 On the other side of the alligator clip, there are two wires that have a clip at the end. Grab a jumper wire; notice
one side has a pin sticking out? That is called a male connector. The other side, which doesnt have a pin sticking
out, is the female side. Connect the alligator clips to the male sides of two different jumper wires.

3 In your kit, you should have a flex sensor, force sensor and trimpot. When the flex sensor is bent in any direction,
the sensors values changes. When pressure is applied to the force sensor, the sensors value changes. When you
rotate the trimpots knob left or right, the values changes.
To add the flex or force sensor:
Both sensors have two male pins at the end. Choose one sensor you want to work with, and plug each of the
sensors male pins into a female end of two different jumper wire.

Page 3

To add the trimpot:


The trimpot has three pins. Connect the female end of one of the jumper wires to one of the outer trimpot pins - it
doesnt matter which outer pin you choose. Take the other jumper wire and connect the female end to the middle pin.

YOURE PROTOTYPING!
Since you are prototyping, please keep in mind that the jumper wires might become loose or disconnect from the
sensor if you move the parts around. If that happens, you will need to reconnect the jumper wires to the sensor again.
Remember that the PicoBoard has four end connectors - A, B, C, and D - so this means you can have up to four extra
sensors connected to the PicoBoard at the same time! You will see different values for the advanced sensors depending
on which sensors you use.
Trimpot: 0 - 50
Flex sensor: 70 - 100
Force sensor: 100 - 0
Seeing different values is a nice feature, since teachers can use it to start talking about sensor range, sensor calibration,
algebraic range shifting and Measurement and Data correlation.

Page 4

ACTIVATING COM PORT IN SCRATCH


1 Identify which COM port your PicoBoard is on.
! Need Help Finding COM Port in Windows?
First, go to Control Panel. Then click on System. After that, click on your Device Manager. To expand and see what
ports are being used, click on the down arrow next to Ports. If you are still having trouble with which COM port
the PicoBoard is on, you can unplug the USB cable from your computer and see what COM port disappears. Plug
the USB back into your computer and the COM port should reappear. This is the COM port your Picoboard is on.

For the example above, you can see that the PicoBoard is on COM9.
2 Open the downloaded Scratch program.
Tip: Look for the Scratch Cat logo

and double click to open.

3 On the top left corner, click on Sensing.

Page 5

4 Right click on slider - sensor value or sensor - button pressed. Then click on show ScratchBoard watcher.

5 Right click the off on the ScratchBoard watcher. You will want to click select serial/USB port. Then click the COM
port your PicoBoard is on. If you are running Mac OS X, choose the port that says /dev/tty.usbmodem###### or
/dev/tty.usbserial-A#######. If you are running Windows choose the COM port you indentified earlier. You should
see now sensor values in the ScratchBoard watcher!

Windows

Mac OS X

HAVE FUN PROGRAMMING


You are now set up and ready to do programming in Scratch! In Scratch, more PicoBoard examples can be found by
going to File -> Open -> Examples -> Sensors and Motors. When you are done, you can share your project or view
other projects on the Scratch website at: http://scratch.mit.edu/
Page 6

You might also like