Scratch is a tile-based visual programming language, which is an excellent first language for children to learn. We are providing a helper app that allows you to use Scratch 2.0 with Finch and Hummingbird. This is beta software and there are several bugs: please test it and let us know if there are bugs or if you'd like us to make changes to anything.
- Video Tutorials
- Configuring Scratch for Finch - Windows, Mac, and Linux
- Configuring Scratch for Finch - Chrome OS
- Finch Scratch Blocks
- Step by Step Examples
- Assignment and Activities
- Known Issues and Troubleshooting
In order to connect Scratch 2.0 with Hummingbird or Finch, you will need to install a helper application, the BirdBrain Robot Server or the Finch Connection app. Follow the instructions for your OS:
Download the Windows installer and double click on it. Follow the instructions in the installer. Once installation is complete, a short cut to BirdBrain Robot Server will appear on your desktop.
Download the Mac installer and double click on it to mount the disk image and open the installation folder. Drag the "BirdBrainRobotServer" lightbulb icon into the "Applications" directory. To run it, go to Applications and double click on BirdBrainRobotServer.
If you are running Mac OS 10.9 (Mavericks) or later, disable "App Nap" on the BirdBrain Robot Server the first time you run it. To do so, CTRL-click on the BirdBrain Robot Server application and select Get Info in the resulting menu. In the Info window, check the box for Prevent App Nap:
Download the debian installer and install it. You will need administrator privileges to install.
Download the Linux package and unzip it. Place the resulting folder in a convenient directory. Auto-configure by running the "Configure" script as root. You can do this by navigating to the BirdBrainRobotServer directory and typing "sudo ./Configure". The configuration script will install a USB HID library in your /usr/lib/ directory and will write udev rules to allow you to use Finch and Hummingbird as a normal user. If this configuration fails, please email us for manual instructions (we need feedback from you if it breaks, as we are unable to test on all Linux variants). Once you have configured the package, you can run Snap by double-clicking on "LaunchSnap" and selecting "Run".
Visit the Chrome webstore to install the Finch Connection App.
Important note 1: Projects saved on a Chromebook will not work with the BirdBrain Robot server used on Windows, Mac, or Linux. If this is an issue, you can also install the Finch Connection Chrome app on Windows, Mac, or Linux. Similarly, projects saved on Windows, Mac, or Linux with the Birdbrain Robot Server will not work with the Finch Connection app.
Important note 2: If using the Chrome app on a Macbook running Mac OS 10.9 or later, keep some part of the Finch Connection App visible on the desktop to prevent app nap.
Check out this great introduction to using Finch in Scratch 2.0 by Bill Steinbach of Northwood STEM.
At present, the Finch only works with the Scratch 2.0 off-line editor. Once you have installed the editor and the BirdBrain Robot Server, do the following:
- Plug in a Finch.
- Start the BirdBrain Robot Server helper application. It should show that the Finch is connected.
- Start Scratch 2.0 by clicking on "Open Scratch" in the BirdBrain Robot Server. In Windows and Mac, the Finch blocks will show up in the More Blocks category.
- Download the zip file containing the Finch and Hummingbird extensions, as well as a few example programs.
- Import the Finch Extension file (finch.s2e). Hold down the Shift key and click on File at the top left hand corner of the page. You should see the following:
Configuring Scratch with Finch - Chrome OS
- Plug in the Finch
Launch the Finch Connection App:
- Click the Open Scratch button on the app to automatically load a ScratchX page with the Finch blocks loaded, and accept any prompts when the page loads.
Note: If the ScratchX page does not load when you press Open Scratch, you can access it directly here.
- Move Finch left: right: Sets the power to the left and right wheels. The range is -100 to 100; for example Move Finch left: 100 right: 100 is full forward, left: -100 right: -100 is full backwards.
- Finch LED color R: G: B: Sets the color of the Finch's beak. The R, G, and B arguments control the intensity of the red, green, and blue elements in the Finch's beak. Range is 0 to 100 for each color.
- Finch buzz at Hz ms: Plays the Finch's buzzer with a sound of the frequency specified for the time specified. Range is 20 to 20,000 for frequency.
- Finch temperature: Returns the current temperature in Celsius.
- Finch left light and right light: Returns the intensity of light hitting the left or right light sensor. The values are in a range from 0 to 100 where 0 is total darkness and 100 is saturation of the sensor.
- Finch left and right obstacle: These are boolean or predicate blocks, returning true if an object is 1-4" from the sensor and false otherwise.
- Finch X/Y/Z Acceleration: Returns the current g-forces measured along the Finch's X (beak to tail), Y (wheel to wheel), and Z (top to bottom) axes. Range is -1.5 to 1.5 gees.
- Finch Orientation: Returns the current orientation of the Finch. Possible responses are Level, Upside Down, Beak Up, Beak Down, Left Wing Down, Right Wing Down, and In Between.
The Speak block will cause the computer to say whatever text is placed in the box.
We have created six step by step examples that demonstrate how to create Scratch and Finch projects. Check them out below. The sample code for these examples will not work on Chromebooks, but you can use the step by step instructions to construct our examples on the Chrome platform.
|Simple Remote||Use the keyboard to control the Finch's movement and beak color||Beginner|
|Obstacle Avoider||Automatically detect and drive around obstacles||Beginner|
|Finch Dance||Make the Finch dance by using movement, LED, and wait blocks||Beginner|
|Light Follower||Program the Finch to follow a flashlight||Intermediate|
|Simon Says||Create an interactive game using the Finch as a controller||Advanced|
|Finch Pong||Use the Finch to control the paddle in a game of Pong||Advanced|
The BirdBrainScratch zip file includes nine Finch example files. They are described below. Please note that these files can only be used with the Birdbrain Robot Server and the offline version of Scratch 2.
GraphAccelerometers - This program graphs the values of all the accelerometers over time.
GraphLightTemperatureObstacles - This program graphs the light sensor values and temperature over time, as well as displaying an X if the left or right obstacle sensors are triggered.
ObstacleAvoider - Finch will go straight unless it sees an obstacle, in which case it turns and backs up.
example-file-1-simple-remote.sb2 - This program is used in the simple remote example.
example-file-2-obstacle-avoider.sb2 - This program is used in the obstacle avoider example.
example-file-3-finch-dance.sb2 - This program is used in the Finch dance example.
example-file-4-light-follower.sb2 - This program is used in the light follower example.
example-file-5-simon-says.sb2 - This program is used in the Simon says example.
Check out assignments and activities designed for Scratch appropriate for elementary, middle , and high school. Please note that all of the Scratch sample programs for these activities were created for the Birdbrain Robot Server; this sample code cannot be used on a Chromebook.
Known Issues and Troubleshooting
- Loops with just Finch command blocks seem to run just once instead of looping. Add a non Finch/Hummingbird block into the loop to make the loop work (a good dummy block is a "Wait 0").
- In Mac OS 10.9/10.10 the sensor values may update very slowly. This is caused by App Nap putting the BirdBrain Robot Server to sleep, make sure you have the latest version of the software and follow the instructions in the Installation section for disabling App Nap.
- In Mac/Linux, if both Finch and Hummingbird are plugged in, you may see a 5-10 second delay after you try closing the server, and you may get an error message on close.
- In Mac/Linux, occasionally the application will not quit when you try to close the window - end the process with force quit in mac, or kill in linux.
- If the robot seems to stop responding for any reason, there is no need to close Scratch. Close the BirdBrain Robot Server application instead and re-open it.
- If the "Open Scratch" button on the BirdBrain Robot Server does not open Scratch, or opens Scratch without the Finch blocks loaded, you can load the Finch extension file manually.
- The Finch Connection App for Chrome must stay visible on the desktop if using it with a Macbook running OS 10.9 or later. If the app is minimized, sensor values will stop updating and output commands will be sent very slowly.