The BirdBlox app allows you to program your Hummingbird over Bluetooth using a tablet! To use this app, you will need a Hummingbird Controller; a Hummingbird BLE Adapter; an iOS, Fire, or Android tablet; a computer (to burn the firmware); and a USB Cable. You can buy the Hummingbird BLE Adapter here.
- Burn Firmware
- Attach Hummingbird BLE Adapter
- Install BirdBlox
- Connect Hummingbird to Tablet
- Programming with BirdBlox
- Zooming In and Out
- Saving and Loading Projects
- Known Issues and Troubleshooting
1. If you have not done so already, follow the instructions to download and install the Hummingbird Firmware Burner. If you installed BirdBlox before February 2018 and have purchased Hummingbird BLE 2.0 Adapters, you will need to download a new copy of the Hummingbird Firmware Burner and reinstall.
2. On windows only: You will need to install drivers for the Hummingbird's bootloader. Download the Hummingbird driver installation program and run it once with administrative privileges.
3. Connect your Hummingbird to your computer using the USB cable. Since the bluetooth adapter will stick out from the back of the Hummingbird, we recommend that you attach the standoffs (the small black legs) to your Hummingbird board.
4. Open the Hummingbird Firmware Burner and select the option for the bluetooth adapter that you have.
5. On the bottom of the Hummingbird, locate the reset button. Press and hold the button for one second, then release it.
6. You should see a message stating that the firmware uploaded successfully. In addition, the status light by the USB port should be slowly fading in and out.
7. Unplug the USB cable so that the Hummingbird is now off.
Attach Hummingbird BLE Adapter
1. On the bottom of your hummingbird, locate the 2x3 pin connectors indicated below. The Hummingbird BLE Adapter will connect to these pins and the bottom four pins on the side of the board.
2. Place the module on the pins and gently slide it into place.
The BirdBlox app is available for iOS, Android, and Fire devices.
BirdBlox works with iPad 3 or newer, as well as all versions of iPad Mini, Air, and Pro. Your iPad must be running iOS 9 or later. On your iPad, open the App Store and search for the "BirdBlox" app or follow this link.
To use BirdBlox, your device must support BLE, which is sometimes called Bluetooth 4.0. Many Android devices support BLE, but we cannot test all of them. Before you purchase a Hummingbird BLE adapter, ensure that you can install and launch the BirdBlox app to make sure that your device supports BLE. The app is available on Google Play.
Kindle Fire Devices
BirdBlox works with Kindle Fire tablets made since 2014, including Fire HD 6, Fire HD 7, and Fire HD 8. The app is available at the Amazon Appstore.
Connect Hummingbird to Tablet
1. Use the AC adapter to plug your Hummingbird into a wall socket.
2. Attach an LED to LED port 1.
3. Open the BirdBlox app. You may see a message telling you to turn on bluetooth. If this happens, tap Settings and slide the switch to enable bluetooth. The app may also ask you to allow BirdBlox to access your location.
4. Return to the BirdBlox app. You will see a dialog box that asks you to open an existing program or create a new one. Tap New and give your program a name such as "test." As you write your program, it will be saved automatically with this name.
5. To connect to your Hummingbird, tap the Hummingbird Connection icon at the top of the screen. Then tap Connect HB. Select your Hummingbird from the list of devices. Each Hummingbird has a three word name like "Furry Pearl Dolphin." If you don't know which Hummingbird is yours, just pick one.
6. Once BirdBlox is connected to a Hummingbird, you will see a blue light on the bluetooth adapter. If you have multiple Hummingbirds, this will tell you which one you have connected to. Once you know a Hummingbird's name, it is useful to write the name on a piece of masking tape and tape it to the top of the Hummingbird board. This will make it easier to connect to the device in the future.
7. When BirdBlox is connected to a Hummingbird, there will be a green circle by the Hummingbird Connection icon, and the blocks on the Robots menu will appear. If the robot becomes disconnected, the circle will turn red and the blocks on the Robots menu will be gray.
8. You are now ready to program the Hummingbird with your tablet!
Programming with BirdBlox
Birdblox is based on Snap!/Scratch. The blocks in the Operators, Control, and Variables menus are similar to the blocks in the corresponding menus in Snap! or Scratch. For those unfamiliar with the Snap!/Scratch interface, you can learn more about the blocks in these menus at the Scratch Wiki.
Using Touch Controls
Using BirdBlox on a tablet is a little different from the normal mouse-and-keyboard interface. You can use the following gestures:
- Touch and drag blocks to move them.
- Place your finger on an item and hold it there to perform actions that would usually require clicking, such as accessing menus or duplicating blocks.
To edit a number, tap on it and a number pad will appear. Press the check mark to close the number pad when you are done.
To edit text, tap on the text and a keyboard will appear. Press "Okay" when you are done.
- Swipe your finger over the Scripts area (dark gray part of your screen) to scroll. Swiping over blocks will move them rather than scrolling.
- A two-finger spread gesture can be used to zoom in on blocks in the Scripts area. A two-finger pinch will zoom out.
The blocks on the Robots menu allow you to control the device's motors, servos, and LEDs as well as read sensor values.
- Hummingbird Servo: Sets servos 1 through 4 to a value from 0 to 180 degrees.
- Hummingbird Motor: Sets motor port 1 or 2 to a value from -100 to 100.
- Hummingbird Vibration. Sets vibration motor 1 or 2 to an intensity value from 0 to 100.
- Hummingbird LED: Sets the intensity of light on a single color LED on ports 1 through 4. Intensity ranges from 0 to 100.
- HB TRI-LED R G B: Sets the full color LED at port 1 or 2. The R, G, and B arguments control the intensity of the red, green, and blue elements in the tri-color LED. Range is 0 to 100 for each color.
All sensing commands allow the user to specify the port to which the sensor is attached. For example, a distance sensor on port three would be read by Hummingbird Distance CM 3 or Hummingbird Distance Inch 3.
- Hummingbird Light: Returns the value of a light sensor, range is 0 to 100.
- Hummingbird Temperature C: Returns the value in Celsius of a temperature probe.
- Hummingbird Temperature F: Returns the value in Fahrenheit of a temperature probe.
- Hummingbird Distance CM: Returns the distance to an object from a distance sensor in centimeters. The range is 8 to 60 cm with the kit's range sensor (a value greater than 60 cm should be considered as not seeing an object).
- Hummingbird Distance Inch: Returns the distance to an object from a distance sensor in inches. The range is 3 to 24 inches with the kit's range sensor (a value greater than 24 inches should be considered as not seeing an object).
- Hummingbird Knob: Returns the value of the hummingbird's knob; range is 0 to 100.
- Hummingbird Sound: Returns the value of a sound sensor, range is 0 to 100.
The Tablet menu in BirdBlox contains blocks that take advantage of the tablet's built-in sensors.
- Device Shaken: Returns true if the tablet has been shaken recently. After returning true, the block will return false on subsequent checks until the device is shaken again.
- Device Latitude/Longitude: Returns a list with the longitude and latitude of the tablet.
- Device SSID: Returns the SSID (the name) of the Wi-Fi network the tablet is connected to.
- Device Pressure: Returns an air pressure reading from the device's barometer in kilopascals. This block will only work if you are using a device with a built-in barometer.
- Device Relative Altitude: Returns the change in the tablet's altitude (in meters) since the app was opened. This is determined using the device's barometer, which is necessary for the block to work (see the Device Pressure block).
- Device Acceleration: Returns a list with the acceleration in the x, y, and z directions.
Device Orientation: Returns text which describes the orientation of the tablet. Possible outputs include:
"Landscape: home button on left"
"Landscape: home button on right"
"Portrait: home button on bottom"
"Portrait: home button on top"
If your project is using this block, you may want to lock the screen orientation by swiping up twice from the bottom of the screen and tapping the Orientation Lock icon so it turns white.
- Display: Shows text on the screen in one of three positions.
Zooming In and Out
To make the blocks in the menus larger or smaller, tap the Settings icon and then select Zoom in or Zoom out. If you are working on a device with a small screen, you may need to zoom in so that you can select blocks more easily.
Saving and Loading Projects
In BirdBlox, projects are saved automatically to the memory of the tablet. They will only be accessible on the current device and will be deleted if the app is uninstalled. To transfer a project to another device or back it up more securely, you can export the program. This process is summarized in the video below.
To create a new project, tap on the File icon.
From the File screen, you can open an existing file or create a new project with the New button. To rename a file, tap the pencil beside the project name.
To delete or duplicate a file, tap the dots beside the file name. When you duplicate a project, you will be prompted to give it a new name.
To move a program from one device to another, you can export it. From the File screen, select the Export button by the name of the project you wish to export. A number of options are available. You can use AirDrop to transfer the project to a neighboring device, you can email the project as an attachment, or your can upload to project to a cloud storage option such as Google Drive. The last option requires that you have an additional app installed for the cloud storage option that you choose. For example, you will need the Google Drive app to export your file to Google Drive. Because most storage apps are not available for the Amazon Fire, email is the best choice for exporting with these devices.
To import a program from your email, tap it and then select Copy to BirdBlox. You may need to scroll to the right to see this option. Your device will open BirdBlox, but it will not load the file automatically. You will need to load the file from the File screen.
To load a file from Google Drive or another cloud storage option, tap the cloud icon on the File screen. Use the Locations button to select Google Drive, if necessary. Then tap the name of the file that you want to open.
Using Multiple Hummingbirds (BETA)
BirdBlox can connect to multiple Hummingbirds. The app currently includes a beta version of this functionality.
To connect to multiple Hummingbirds, tap the Hummingbird Connection icon and then the Connect Multiple button.
Tap the + button on the Connect Multiple screen. Then select the name of a second Hummingbird. You can connect at least 3-4 Hummingbirds to a single tablet in this way. The maximum number of Hummingbirds depends on your device.
Once you are connected to multiple Hummingbirds, each block in the Robots menu will allow you to specify which Hummingbird board to use with that block.
These step by step example projects show how to use the iPad's touch screen and sensors to control the Hummingbird.
|Motor Mover||Create a program that remotely controls a motor or servo using the BirdBlox app||Beginner|
|LED Accelerometer||Use a tri-color LED to display the tablet's current acceleration||Intermediate|
|Maze Game||Use tablet accelerometer to control a ball in maze game actuated by Hummingbird servos||Advanced|
The following six projects were originally designed for the browser version of Snap! and will require some slight modifications to work with the BirdBlox app. They are still good examples of what more complicated programs can do.
|Traffic Light||Build a working traffic light out of LEDs||Beginner|
|Burglar Alarm||Flash LEDs and vibrate when someone gets too close||Beginner|
|Rainbow LED||Make a tri-color LED fade through the colors of the rainbow||Intermediate|
|Dimmer LED & Servo||Control a servo and LED with a rotation sensor||Intermediate|
|Sprite Sizer||Make the cat sprite bigger or smaller with the distance sensor||Intermediate|
|Combination Lock||Utilize variables and procedures to make the Hummingbird turn a servo when someone enters the correct combination||Advanced|
Known Issues and Troubleshooting
- If you try to connect to your Hummingbird and do not see it in the list of devices, make sure that the board is plugged into AC power or a battery pack. Also, make sure that bluetooth is enabled on your tablet.
- If a Hummingbird with a bluetooth adapter is plugged in for a long period of time (several hours), it may forget its name. Its name will then appear as "Adafruit Bluefruit LE." On Android devices, the Hummingbird will recover its name if you disconnect it from power and then reconnect it. This may not work on iPads, so connect to any available Hummingbird and then check for the blue connect light on the bluetooth module to ensure that you have connected to the correct device.
- iOS 11: BirdBlox crashes when you try to connect to the Hummingbird. Power cycle the Hummingbird (unplug it and plug it back in) to resolve this issue.
- iOS 9: BirdBlox may freeze when blocks are moved rapidly around the screen. Force quit the app and reopen.