Ardublock: Installation for Hummingbird Ardublock/Arduino

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.



Click here for Arduino 1.6.0 or later

Click here for Arduino 1.0.5 or 1.0.6


Click here for Arduino 1.6.0 or later

Click here for Arduino 1.0.5 or 1.0.6


Click here for Arduino 1.6.0 or later

Click here for Arduino 1.0.5 or 1.0.6

If you choose to use Linux, we recommend using Ubuntu with our robots. You are welcome to use another version of Linux, but we are only able to provide technical support for Ubuntu.

Installation Instructions

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:

  • In Windows, unzip the folder and run the executable file HummingbirdArdublockInstaller.exe.
  • In Mac OSX, open the disk image and run the app HummingbirdArdublockInstaller.
  • In Linux, unzip the folder and run the file after making it executable.
  • 5. In the resulting window, click the big Install button:

    The Hummingbird Ardublock Installer installs the following:

    • The Ardublock drag-and-drop Arduino programming environment
    • Hummingbird Duo board support for the Arduino environment
    • Hummingbird Duo Arduino library and examples
    • Hummingbird Duo Ardublock examples
    • Windows only: Required drivers for Hummingbird Duo Arduino bootloader and Hummingbird Duo in Arduino mode

    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.

    Verifying your Installation

    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:

    Example Programs

    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.

    • BlinkLED: Blinks the status LED and the LED on port 1 for 0.5 seconds on, 1 second off.
    • FadeLED: Fades on and off the status LED and LED on port 1.
    • KnobMotorControl: Controls the speed of a gear motor on port 1 with a knob sensor attached to sensor port 1.
    • LEDThermometer: Sets the color of a tri-color LED on port 1 to correspond with a temperature from a temperature sensor attached to port 4. Also prints the temperature in Celsius over the serial port. Blue is 10 C or less, green is 25 C, and red is 40 C.
    • SensorPrinter: Prints the values of the four sensor ports, first as raw values, and then converted into units assuming a light or knob sensor attached to port 1, a sound sensor on port 2, a distance sensor on port 3, and a temperature sensor on port 4. Also prints the system voltage.
    • SensorTrigger: Checks the sensor value on port 1, if it’s below 100 it turns off the status LED and turns on a vibration motor and an LED. If it’s 100 or more, it turns on the status LED and turns off the LED and vibration motor.
    • SerialHummingbirdInterface: Allows control of outputs and reading of sensors via a serial interface.
    • SimpleServo: Moves the servos in order from port 1 to 4 between 0 degrees and 180 degrees.
    • SlowMotionServo: Moves one servo from 0 to 180 degrees and back slowly.


    Ardublock Advanced

    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.

    Duo’s Hummingbird and Arduino Sides

    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.

    Using top side Hummingbird connectors

    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.

    Using bottom side Arduino connectors

    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.

    Mixing top and bottom side connectors

    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
    0 Not used
    1 Not used
    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
    Analog In
    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
    MISO Not used
    SCK SCK to motor/servo controller, can be used for additional modules

    Source Code

    The full source for the Ardublock installer is at our Github repo. It is released under the GPL v3.0 license.

    The source code for the Hummingbird Arduino library is available on Github, and is also installed in the Arduino Sketchbook folder at libraries->Hummingbird.