programming a finch without being able to read (parent required)

Someone at work was asking me about robots for kids. I offered to lend him my Finch to try out. I noticed there’s an experimental language called Snap! on there now which says it can be used by ages 4-7. The idea of Snap! is that it is a simplified Scratch which is also supported. I really like that the Finch supports such a range of languages from ones like Snap! and Scratch to “full fledged” languages like Java and Python. I also like that it has a variety of sensors so you can incrementally make things harder.

Anyway, I wanted to give Snap! a try to see how easy it was too use. My was it easy. Including downloading the software, it took me less than 15 minutes to get the finch to move forward and back having a different color nose when pressing keys. (and another 15 to make sure installing Java 6 didn’t mess up anything else on my machine.)

Install (parent required)

I downloaded and installed the BrainBirdRobotServer which was clearly described on the Snap! page. Installing was the usual for Mac; just drag to the Applications folder. The only catch was that I had to re-install the long since unsupported Java 6. Not a big deal. The software even gave me the link. And it didn’t muck with my paths for anything else so Eclipse/Ant/Tomcat/Postgres etc still work normally.

Setup and initial run (parent required)

This isn’t hard, but it does require being able to read so a four year old isn’t going to be able to do it alone.

  1. Open BrainBirdRobotServer
  2. Click Open Snap! I choose local since I wasn’t planning to save my program
    finch1
  3. Plug in the Finch. (One end of the wire goes into the Finch and the other end goes into a USB drive on your computer. I put it in a USB hub
  4. Write program. It opens with a simple one that drives forward with a green nose if you press space. I adapted it to go forward with a green nose when you press the up arrow and backward with a red nose when you press the down arrow.
    finch2
  5. Press up and down and watch Finch move. That’s it.

Play

What more to say here. These basic blocks already do stuff. And then the parent can show the kid more blocks.

Making it harder

Assuming the kid can read (or you are present), the higher levels of Snap! allow writing more complicated programs. I couldn’t figure out how to change the level other than editing the URL. You can easily sense the pattern here. The only catch is that I had to load the page twice with the new level URL to see it.

  • http://snap.berkeley.edu/snapsource/snap.html#cloud:Username=birdbraintech&ProjectName=FinchLevel1
  • http://snap.berkeley.edu/snapsource/snap.html#cloud:Username=birdbraintech&ProjectName=FinchLevel2
  • http://snap.berkeley.edu/snapsource/snap.html#cloud:Username=birdbraintech&ProjectName=FinchLevel3

The higher levels allow adding timing delays and such.

Caveat

As far as I can tell, the Snap! language doesn’t allow you to use all the sensors on the Finch. But it looks like a fun way to get started. (Not true. The highest levels can at least use some of them)

getting started with the Finch in NetBeans

This year the robotics team is using The Finch for teaching the new programmers about programming.  The robot is cute and I know I’d want to play with it so I bought one too.

While I like Eclipse better than NetBeans, the programming team uses NetBeans.  I decided to try out NetBeans with the Finch so I’m familiar with their platform/interface.  I’ll want it soon enough anyway to check out NetBeans projects from git.

Step 1 – Install NetBeans on the Mac

  1. Download NetBeans – the basic JSE edition
  2. Open dmg file which allows you to choose to run the installer.
  3. Choose defaults and install
  4. When first launch NetBeans asks if want to install JUnit.  (not clear on why JUnit doesn’t come with NetBeans – it comes with Eclipse)
Step 2 – Import Finch project
This one took me a few minutes.  You need to
  1. Download the NetBeans project
  2. Copy it to the NetBeans project directory which is /Users/me/NetBeansProjects on a mac
  3. In NetBeans, File > “open project” and then drill down to Finch.
Step 3 – Run a program
  1. Connect the Finch’s USB to your computer.  (The tutorial doesn’t say this, but it is implied.)
  2. Per the tutorial, choose Run > Run File.
  3. Enjoy the Finch.  It’s so cute!
Step 4 – Run a different programs
I very carefully misunderstood the instructions about not choosing Run > Run and did it anyway.  Luckily, you can choose Run > Run File and have it ignore your preset default.  Or you can completely unset it by editing the file FinchBeans/nbproject/project.properties and removing the main class line.  Then I can remember to choose Run > Run File.