Click here for Arduino 1.6.0 or later
Click here for Arduino 1.0.5 or 1.0.6
To use the Hummingbird Duo in the Arduino environment, or with Ardublock, you’ll need to install Arduino and then install our libraries and our version of Ardublock.
1. Install the Arduino IDE.
2. Run the Arduino IDE one time – simply open and close it. This may seem odd, but the first time Arduino launches it creates a number of folders that are necessary for our installation utility to operate properly.
3. Download our utility for installing the Hummingbird Duo Arduino libraries and Hummingbird Ardublock version. Please make sure to download the correct utility for your version of Arduino (see above purple box).
4. Once the utility is downloaded:
5. In the resulting window, click the big Install button:
The Hummingbird Ardublock Installer installs the following:
If you get an error, try the following steps to install the Hummingbird files manually:
1. Download and extract the Hummingbird Arduino files.
2. Locate your Arduino Sketchbook folder. Open the Arduino IDE and go to File->Preferences (Arduino->Preferences on a Mac). In the resulting menu, make note of the path to the Sketchbook IDE:
3. Copy the folders “libraries, hardware, tools, and ArdublockDuoExamples” to the Arduino Sketchbook folder. If you already have existing folders named libraries, tools, etc in the Sketchbook folder, then merge the contents of the folders.
4. WINDOWS-ONLY. Go into the WindowsDrivers folder and double click runDriverInstall.bat.
5. Restart the Arduino IDE.
Once you’ve installed the Hummingbird Arduino libraries and Ardublock, you can verify that installation was successful by opening (or re-opening) the Arduino environment.
First, select the Hummingbird Duo as your board type by navigating to Tools->Board->Hummingbird Duo:
Under File ->Examples ->Hummingbird you should now see ten Hummingbird Duo Arduino example programs, and under Tools you should see Ardublock:
Both Ardublock and Arduino come with a number of example programs. The Hummingbird Ardublock example programs were placed in your Arduino Sketchbook folder when you installed Ardublock. You can also get them by downloading this zip file. You can access the sample programs in the Arduino IDE by navigating to File->Examples->Hummingbird.
The sample program below are available in both Ardublock and Arduino. A sample program named BlankSlate is also included for Arduino; this is a basic starter file that includes the minimum necessary code for a Hummingbird Duo program.
The version of Ardublock installed by our utility is a branch created by us that strips out most contributed libraries and some core Ardublock blocks to created a cleaner interface. If you prefer to use Ardublock on Hummingbird Duo with all blocks enabled, check the box in the installer. You can run the installer as many times as desired, checking and unchecking the box to switch between Ardublock versions:
On some systems Ardublock advanced seems to cause Arduino to crash due to an out of memory error. If this is the case, attempt to launch Arduino with a larger Java memory allocation or use the basic Ardublock instead of advanced.
Hummingbird Duo has connectors for components on both the top and bottom of the board. The top side, or Hummingbird connectors, are used for connecting to Hummingbird kit components like sensors, servos, LEDs, and motors. The bottom side connectors follow the standard Arduino header spacing and pinout and can be used for connecting to hundreds of Arduino shields. There are three ways to use Hummingbird as an Arduino; you can use solely kit parts and connect them to the Hummingbird top side connectors, you can use solely Arduino shields and the bottom side connectors, or you can use both.
The top side Hummingbird connectors are specifically designed to interface with Hummingbird kit parts, and the Hummingbird Arduino library described in section 3 is designed with this assumption in mind. You may also choose to interface non-kit parts to these connectors – for example, standard LEDs in the LED port, or non-kit motors/servos. Make sure to read the Hummingbird Duo datasheet for more information about using the connectors with non-kit components.
The bottom side Arduino connector pinout is identical to that found on the Arduino Leonardo and is compatible with all Leonardo-compatible shields. There are two important considerations to using Hummingbird exactly as an Arduino Leonardo:
Integrated Motor/Servo Shield: The gear motors and servos are controlled by a secondary processor that is controlled by the main microcontroller via SPI. SPI can be shared between multiple shields/devices, but we needed to use one I/O pin as the “slave select” line. We are using Arduino pin 8 for this function. If you wish to use the integrated motor/servo capabilities of the Duo, rewire any shields that use pin 8 to an alternative I/O pin.
Battery Voltage Detect: The Hummingbird Duo has an integrated battery voltage monitor that makes use of analog input pin A5. Use another analog port if you wish to retain this feature. You can use A5 as a traditional analog input: an external analog signal will safely override the battery voltage signal.
It is quite possible to use Arduino shiels and top side connectors simultaneously, but care must be taken to ensure that signals that map to both the top and bottom connectors are appropriately programmed and connected. It is good practice to connect only one component to each signal; for example, if you have an Arduino shield that makes use of Arduino I/O pin 6, you should not also connect the green element of the tri-color LED on port 2. Observe the following tables when mixing top side components with Arduino shields:Digital I/O
|Arduino Pin||Hummingbird Use|
|2||Controls LED port 2|
|3||Controls LED port 1|
|4||Controls RGB port 1, green element|
|5||Controls RGB port 2, red element|
|6||Controls RGB port 2, green element|
|7||Controls RGB port 1, red element|
|8||Controls SPI slave select for motor/servo controller.|
|9||Controls Vibration motor 1|
|10||Controls Vibration motor 2|
|11||Controls RGB port 2, blue element|
|12||Controls RGB port 1, blue element|
|13||Controls Status LED on top side, ‘L’ LED on bottom|
|SDA||Controls LED port 2|
|SCL||Controls LED port 1|
|Arduino Pin||Hummingbird Use|
|0||Controls LED port 4|
|1||Sensor 1 input|
|2||Sensor 2 input|
|3||Sensor 3 input|
|4||Sensor 4 input|
|5||Battery voltage monitor|
|Arduino Pin||Hummingbird Use|
|MOSI||MOSI to motor/servo controller, can be used for additional modules|
|SCK||SCK to motor/servo controller, can be used for additional modules|