NEW Hummingbird Bit: BirdBlox Lessons

Setup

Steps 1 2 3 4 5 6 7
Steps 1 2 3 4 5 6 7
Steps 1 2 3 4 5 6 7
Steps 1 2 3 4 5 6
Steps 1 2 3 4 5 6 7
Steps 1 2 3 4 5 6 7
Steps 1 2 3 4 5 6 7 8 9

Step 1

This module will cover how to connect to the Hummingbird Bit and start programming in BirdBlox.

Step 2

Install BirdBlox onto your tablet or smartphone.

Step 3

Insert a micro:bit into your Hummingbird Bit Controller. The Hummingbird also needs a source of power, so connect it to the battery pack or AC power adapter. Connect your micro:bit to the computer with the USB cord.

Step 4

Download this file and drag it onto the micro:bit (you will need a computer with a USB port for this step). Your device should start to flash three letters on its display.

Step 5

Remove the USB cord. You are ready to program wirelessly with BirdBlox!

Step 6

Open BirdBlox.

Step 7

Tap New to create a new program.

Give your program a descriptive name.

Tap the Hummingbird Connect button. Select Connect Device.

Tap the name of your device. To identify your device, look at the initials flashing on the micro:bit connected to the Hummingbird Bit. Match these to the Bit name on tablet.

When you connect to the Bit, you will hear the connection tone, and the initials will stop flashing. On the tablet screen, the dot on the Hummingbird Connect button will turn green, and the blocks for the Bit will turn teal.

Note: If you lose the connection to the Hummingbird, the initials will start to flash, the dot on the Hummingbird Connect button will turn red, and the blocks for the Bit will turn gray. If this happens, tap the Hummingbird Connect button, select Disconnect Device, and then reconnect.

Step 1

This module will show you how to use a single color LED with the Hummingbird Bit. A single color LED is a small light with two wires. The colored wire shows the color of the LED. The Hummingbird kit comes with red, green, and yellow LEDS.

Step 2

Use the terminal tool to plug an LED into LEDS port 1 on the Bit. The colored wire should be connected to ‘+’ and the black to ‘-.’

Step 3

The Bit LED block is used to control a single color LED. To use this block, set the port of the LED to 1, 2, or 3 (BirdBlox defaults to port 1) and the brightness of the LED from 0% to 100%.

Step 4

When the green flag is tapped, the Bit LED is set to full brightness. Since the LED was never programmed to turn off, the light stays on at full brightness.

Reflect: What do you think would happen if you set the LED to 50% instead of 100%?

 

Step 5

Put the Bit LED block into a repeat forever loop. Add a wait block, a second Bit LED block, and another wait block to the forever loop. The wait block stops the program for a number of seconds.

Step 6

Each time through the loop, the program turns the LED on, pauses, turns the LED off, and pauses again. The forever loop repeats this process over and over.

Reflect: What do you think would happen if the bottom pause block was not there?

Step 7

Write a program that makes the LED blink faster. You will have to use decimal points.

Step 1

This module will show you how to use a tri-color LED with the Hummingbird Bit. A tri-color LED is a small light with four wires. The tri-color LED actually has three tiny lights inside it. One is red, one is green, and one is blue. You can combine different amounts of red, green, and blue light to make different colors.

Step 2

Use the terminal tool to plug a tri-color LED into TRI-COLOR port 1 on the Bit. The red wire connects to ‘R,” the green to ‘G,’, the blue to ‘B,’ and the black to ‘-.’

Step 3

The Bit Tri-LED block is used to control a tri-color LED. To use this block, set the port of the LED to 1 or 2 (BirdBlox defaults to port 1) and the amount of red, green, and blue from 0% to 100%.

Step 4

When the green flag is tapped, red is set to full brightness. Since the tri-LED was never programmed to turn off, the red stays on at full brightness.

Reflect: What do you think would happen if you set both red and blue to 100?

Step 5

Put the Bit Tri-LED block into a repeat forever loop. Add a wait block, a second Bit Tri-LED block, and a second wait block to the forever loop. The wait block stops the program for a number of seconds.

Step 6

Each time through the loop, the program turns the LED red, pauses, turns the LED blue, and pauses again. The forever loop repeats this process over and over.

Reflect: How can you use a tri-color LED in a robot?

Step 7

Write a program that changes the color of the LED from purple to teal to green.

Step 1

In this module, you will learn to display icons and patterns on the screen of the micro:bit.

Step 2

Use the Bit Display block to display a small picture on the screen of the micro:bit. This pattern will make a happy face.

Step 3

When the green flag is tapped, the Bit Display is set to the image you created. Since the display was never programmed to turn off, the image remains on the screen.

Reflect: How would you change this code to display a different image?

Step 4

Put the Bit Display block into a repeat forever loop. Add a wait block, a second Bit Display block, and a second wait block to the forever loop. The wait block stops the program for a number of seconds.

Create a face with a different expression in the second Bit Display block

Step 5

Each time through the forever loop, the program shows the first expression, pauses, shows the second expression and pauses again. The forever loop repeats this process over and over.

Reflect: How would you change the code to show 3 different expressions on the micro:bit?

Step 6

Use the shows Bit Display to create a program that shows your very own animation.

Step 1

In this module, you will learn to use the position servo. The position servo is a motor that moves to a particular angle. The Hummingbird position servo can move to any angle from 0° to 180°.

Step 2

Plug in the position servo to SERVOS port 1 on the Bit. Make sure the black wire is aligned to ‘-,’ the red wire to ‘+,’ and the white wire to ‘S.’

Step 3

The Bit Position Servo block is used to control the position servo. To use this block, set the port of the servo to 1, 2, 3, or 4 (BirdBlox defaults to port 1) and the angle from 0° to 180°

Step 4

When the green flag is tapped, the Bit Position Servo is set to 90°. Since the servo was not programmed to move to any other position, it does not move again.

Reflect: Why do you think the position servo moves once, then stops at 90°? Would the servo move if it was already at 90° before you start the program?

Step 5

Put the Bit Position Servo in a repeat forever loop. Add a wait block, a second Bit Position Servo block, and a second wait block to the forever loop. The wait block stops the program for a number of seconds.

Step 6

Each time through the loop, the program moves the servo to 90°, pauses, moves the servo to 180°, and pauses again. The forever loop repeats this process over and over.

Reflect: How would the movement of the servo change if the wait blocks were set to .5 seconds instead of 1 second?

Step 7

Write a program that makes the servo move to 3 different positions.

Step 1

In this module, you will learn to use the rotation servo. The rotation servo is a motor that can rotate at different speeds.

Step 2

Plug in the rotation servo to SERVOS port 1 on the Bit. Make sure the black wire is aligned to ‘-,’ the red wire to ‘+,’ and the white wire to ‘S.’

Step 3

The Bit Rotation Servo block is used to control the rotation servo. To use this block, set the port of the servo to 1, 2, 3, or 4 (Snap! defaults to port 1) and the speed from -100% to 100%.

Step 4

When the green flag is tapped, the Bit Rotation Servo is set to full speed. Since the servo was not programmed to move to stop, it keeps spinning.

Reflect: What would happen if you set the Bit Rotation Servo speed to -100% instead?

Step 5

Put the Bit Rotation Servo in a repeat forever loop. Add a wait block, a second Bit Rotation Servo block, and a second wait block to the forever loop. The wait block stops the program for a number of seconds.

Step 6

Each time through the loop, the program turns the motor on, pauses, turns the motor off, and pauses again. The forever loop repeats this process over and over.

Reflect: What do you think would happen if you changed the speed in the second Bit Rotation Servo block to 40 instead of 0?

Step 7

Write a program that makes the servo spin counterclockwise quickly for 1 second, then clockwise slowly for 3 seconds.

Step 1

Hummingbird sensors measure different things, but they all work the same.

Hummingbird Bit base kits include a light sensor and a dial sensor, while other kits also include sound and distance sensors.

Step 2

Plug a sensor into your board. Any Hummingbird sensor can be connected to any of the three ports labelled “SENSORS” on the Bit. The yellow wire connects to ‘S,’ the red to ‘+,’ and the black to ‘-.’ The videos show a light sensor, but you can use any sensor that you want!

Step 3

Find the Bit sensor block near the bottom of the Robot menu. Use the drop-down menu to select the type of sensor that you are using. To see the value of the sensor in BirdBlox, simply click on the Bit sensor block.

Step 4

You can use the sensor data to control the brightness of an LED.

Plug an LED into LED port 1.

Step 5

Place a Bit sensor block inside a Bit LED block.

Step 6

The Bit sensor block measures the value of the sensor and sets the LED brightness to that value.

Reflect: In this program, the micro:bit runs the Bit LED block about 25 times per second. What do you think would happen if you added a wait block to the forever loop?

Step 7

Your sensor value can be used to make decisions. To turn on an LED when the value of the sensor is low, use an if then else block from the Control menu. This block requires a comparison block, which is in the Operators menu.

Step 8

This program compares the value of the sensor to 10. If the sensor value is less than 10, the program runs the block inside the then section of the if then else, and the LED turns on. When the sensor value is greater than 10, the program runs the block inside the else section, turning the LED off.

Step 9

Can you make an LED turn on and off with a different sensor? Disconnect the sensor you’ve been using and connect a new sensor. Use the drop-down menu in the Hummingbird sensor block to make the block match your new sensor.