LearningForward

Kent Chesnut's technology in education blog.

February 14, 2010

Scratch Balance Board - Part 2

Filed under: Scratch — kchesnut @ 9:50 pm

In this second post about the Scratch Balance Board, I’ll be looking at an extremely simple project - and the process of creating projects for use with the balance board.  Earlier posts that referenced the purpose of the balance board are here and here.

One of the first ideas about a project using the balance board was a virtual segway.  The first step was to build a simple project that uses the 4 arrow keys to control a virtual segway.  Run the project here.  Download the project here.  The key is to control the project by polling the keyboard (instead of looking at keypresses) and using “broadcast” to communicate the state of the keys to the segway sprite.  segsprites.jpg

The segway sprite uses “When I receive” to act upon the keypresses.  A screenshot of the Segway sprite scripts is shown.

  • sorry
  • I’ll
  • use
  • these
  • bullets
  • to
  • spread
  • stuff
  • out
  • again
  • k
  • k
  • k
  • k
  • k
  • k
  • k
  • k
  • k
  • k

boardsprites.jpg

 The next step is to use the board control script to send those same messages.

Scratch will not let you save off a script by itself.  So I created a sprite that contains the board control script.  I then exported that sprite.  When I want to add balance board control to a program, I simply drag the sprite file into the Scratch window.

Here’s a screenshot of the board control script.  There’s a short explanation of this script in last weeks post.

  • k
  • k
  • k
  • k
  • k
  • k

 So how does it work?  I’ve linked in a short narrated video of me trying to drive the segway around the track here .  I used RenderSoft’s CamStudio OpenSource version 2.00 to capture the video and compress it to a .swf file. 

Results from this first simple project:

  • Sometimes I have a little trouble getting the PicoBoard to communicate.  I think it may have to do with plugging other stuff into the USB when it is plugged in - or possibly loading other software.  I’m not sure.  I did have to reload the PicoBoard driver to get the board operational again.
  • The Balance Board is usable - but I found it very useful to have a chair to hold onto when I was trying to drive the segway. 

For the next post, I’ll try to make a little more complex project.  Any comments would be appreciated.

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress