Installation for Hummingbird Bit
This section will show you how to use the Hummingbird with Java on Mac/Windows computers. Your computer must have Bluetooth capability to program the Hummingbird in Java.
Browser-based Java editors are not compatible with the Hummingbird. You can use any offline Java editor with the Hummingbird. If you don’t have a favorite, we suggest trying Eclipse.
Insert a micro:bit into your Hummingbird Bit Controller (you might need to push a little harder than you think!), and connect it to the computer with the USB cord. The Hummingbird also needs a source of power, so connect it to the battery pack or AC power adapter. If you are using rechargeable batteries, check out this support article before using.
Optional step: If your micro:bit is already flashing 3 or 10 characters when powered on, you can skip this step.
Download this file and drag it onto the micro:bit. Your device should start to flash ten characters on its display. You will only need to complete this step once for each Hummingbird – as long as your device is flashing its initials, you are ready to connect via Bluetooth.
After dragging the file onto the micro:bit, remove the USB cord. You won’t need it to use Java.
This section will show you how to use an offline Java editor with the Hummingbird on Mac/Windows computers. Browser-based Java editors are not compatible with the Hummingbird.
You can use any offline Java editor with the Hummingbird, but if you don’t have a favorite, we suggest trying Eclipse. The screenshots here will show Eclipse as an example.
Next, install the BlueBird Connector. This software will handle the Bluetooth connection with the Hummingbird. You must run it in the background while you are programming the Hummingbird in Java.
Download the BirdBrain Java Library.
Open the BlueBird Connector. It will begin finding the robots around you. Click on the name of the robot that matches the initials on your device. The initials are the three letters that flash before the # symbol.
You will hear a sound as your device connects, and the initials will stop flashing on the device. The name of your robot should appear under Connected.
Troubleshooting Note: The BlueBird Connector must remain open in the background the entire time that you are working with the Hummingbird. If your Hummingbird disconnects, the app will notify you, and the Hummingbird will begin flashing its initials again. If this happens, return to the BlueBird Connector and reconnect it.
Eclipse will copy four files into your project: the classes for the Hummingbird and micro:bit (Robot.java, Hummingbird.java, and Microbit.java) and a test file (HummingbirdTest.java). Select these files in Eclipse and drag them into the src folder.
Note: If you get an error in Eclipse, right-click on the src folder and select New/Package. Once you create a new package, drag the .java files into that package.
To test that everything is working properly, connect a single-color LED to port 1 of the Hummingbird. Run the test program and check that the single-color LED blinks 10 times.
Now you are ready to start writing your own Java programs with the Hummingbird! These lessons will help you to get started, and this reference summarizes the methods that are available in the Hummingbird and Microbit classes.
Make sure to store your programs in the Hummingbird project so that they can find the Hummingbird and Microbit classes. If you wish to create a new project, be sure to add the four files in the BirdBrainJava folder to the new project.