Hummingbird Bit: Snap! Lessons

Lessons

1 Connecting Electronics

Steps 1 2 3 4 5
Steps 1 2 3 4 5 6 7 8 9 10 11
Steps 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Steps 1 2 3 4 5 6 7 8 9 10 11
Steps 1 2 3 4 5 6
Steps 1 2 3 4 5 6 7 8 9 10
Steps 1 2 3 4 5
Steps 1 2 3 4 5

Step 1

This module will show you how to plug LEDs, Position Servos, and a Light Sensor into your Hummingbird Bit.

Step 2

Find LED Port 1. Plug the color wire (green, orange, red, or yellow) into the positive (+) terminal and the black wire into the ground (-) terminal. Repeat this process for LED Port 2. When positive and ground are connected, you have a completed circuit. A circuit is required for electricity to flow.

Step 3

The four wires of the tri-color LED are red, green, blue, and black. The black wire should be connected to the ground terminal. The red wire should be connected to the ‘R’ terminal, the green to the ‘G’ terminal, and the blue to the ‘B’ terminal. By mixing red, green and blue light, you can create almost any color.

Step 4

When plugging in the servos, make sure the brown wire is aligned to ground, the red wire to positive, and the yellow wire to “S”. S stands for signal. Positive and ground provide the servo power, while the signal tells the servo which direction to turn.

Step 5

Like the servo, the light sensor has 3 wires. Red and black plug into positive and ground to provide power, while the yellow wire plugs into “S”. Sensory information travels from the light sensor into the Hummingbird through the signal wire.

Step 1

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

TEMP VIDEO

Step 2

Install the BlueBird Connector.

TEMP VIDEO

Step 3

Insert a micro:bit into your Hummingbird Bit Controller, 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.

TEMP VIDEO

Step 4

Download this file and drag it onto the micro:bit. Your device should start to flash three letters on its display.

TEMP VIDEO

 

Step 5

Remove the USB cord. You won’t need it to use Snap!

TEMP VIDEO

Step 6

Insert the bluetooth dongle into a USB port. Open the BlueBird Connector and check that the bluetooth symbol has a green check beside it.

TEMP VIDEO

Step 7

Click Find Robots. You may see one robot or many, depending on how many are nearby.

TEMP VIDEO

Step 8

Click on the name of the robot that matches the initials on your device.

TEMP VIDEO

Step 9

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.

TEMP VIDEO

Step 10

The BlueBird Connector also shows a battery indicator for your Hummingbird. If it is yellow, you may need to replace your batteries. If it is red, you definitely need to replace your batteries. You can also look at the XXXX light on the Hummingbird Bit.

TEMP VIDEO

Step 11

You are ready to begin programming! Click Open Snap!.

TEMP VIDEO

Step 1

In this module and the next, you will learn to use the lights, which are also called light-emitting diodes, or LEDs. The Hummingbird kit contains single color LEDs and tri-color LEDs. Single color LEDs have two wires, while tri-color LEDs have four wires. The surface of the micro:bit contains 25 tiny LEDs that you can use to make pictures and patterns! This module will show you how to use the single color LEDs and the micro:bit LED display.

Step 2

Every program should begin with an event. An event is an action the computer can recognize. We will start our program by pressing the spacebar.

Step 3

The LED blocks are on the Looks menu in Snap!. The micro:bit Display block lets you pick which LEDs should be on and which should be off.

Step 4

Press the spacebar to run your first program!

Step 5

The wait block stops the program for a number of seconds.

Step 6

Add another micro:bit Display block to display a different pattern.

Note: The video shows one pattern, but feel free to create your own!

Step 7

Press the spacebar to run your program.

Step 8

 

Step 9

Leave the when key pressed block, but delete the other three blocks.

Step 10

The Hummingbird LED block is used to control a single color LED. To use this block, first select the port to which the LED is attached (one to three). Then set the brightness of the LED from 0% and 100%.

Step 11

Press the spacebar to run your program. The LED should turn on.

Step 12

Try out other values between 0% and 100% to explore the different levels of brightness that are possible.

Step 13

To turn the LED off, set the brightness to 0%.

Step 14

Use two Hummingbird LED blocks and a wait to turn the LED on and then off.

Step 15

 

Step 16

Select port 2 to control your second LED.

Step 17

 

Step 18

 

Step 1

In this module, you will learn to use the tri-color LED. You will also use loops to repeat blocks in your programs.

Step 2

Delete everything except the when key pressed block.

Step 3

Add a Hummingbird Tri-LED block, select the port of the tri-color LED (1 or 2) and the amount of red, green, and blue light from 0 to 100.

Step 4

Use two Hummingbird Tri-LED blocks and two wait blocks to blink the tri-color LED once.

Step 5

Drag the Hummingbird Tri-LED and wait blocks into a forever loop.

Step 6

 

Step 7

 

Step 8

Add two Hummingbird LED blocks to your program.

Step 9

Now the LED and the tri-color LED blink at the same time.

Step 10

 

Step 11

 

Step 1

In this module, you will 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

Delete any extra blocks from your program so that you are blinking one single color LED.

Step 3

Add two Hummingbird Position Servo blocks so that the position servo moves back and forth as the LED blinks. In each position servo block, select the port of the servo (1-4) and the angle to which it should move (0° – 180°).

Step 4

 

Step 5

Currently, your position servo has one second to move to each angle. You can shorten the length of each pause block to make the position servo move back and forth faster. How short can you make the pauses before the servo no longer has enough time to move all the way from 0° to 180°?

Step 6

 

Step 1

The light sensor measures the amount of light around it. You can use this sensor to make a robot that can detect when it is dark or bright.

Step 2

Drag a Hummingbird Light block into the Scripts area. Click on this block to see the current value of the light sensor.

Step 3

What is the value of the light sensor in the light of your room? What is the value when you cover the light sensor? Write down these values, you will need them later.

Step 4

You can use a sensor to enable a robot to make a decision. For example, suppose you want to turn on an LED if the light sensor detects that it is dark. The if else block is a decision block. The if else block has three parts.

Step 5

The top of the if else block has a hexagonal space. This space requires a Boolean block, which is a block that can be either true or false. You can create a Boolean block using the comparison operators from the Operators menu.

Drag a Hummingbird Light block into a less than comparison.

Step 6

The Boolean block in our sample program checks whether the value of the light sensor is less than 20.

Step 7

If the light sensor is less than 20, the block inside the then section of the if then else is executed, and the LED turns on. If the Boolean block is false, the block inside the else section of the if then else is executed, and the LED turns off. The value that a Boolean block uses to make a decision is called the threshold. In the sample program, the threshold is 20. If the value of the light sensor is less than this threshold, the program decides that it is dark.

Step 8

 

Step 9

 

Step 10

 

Step 1

It is important to save your work frequently in Snap!. This does not happen automatically. This module will cover two different ways of saving your work.

Step 2

If you have internet access, you can save your work in Snap! Using a cloud account. Log in to your account. You may need to set up an account if you do not already have one

Step 3

Once you are logged in, choose Save As on the File menu to give your program a descriptive name. Make sure to select the Cloud option.

Step 4

Make sure to save your work frequently by going to File and then Save.

Step 5

To open a file you saved previously, go to File and then Open.

Step 1

It is important to save your work frequently in Snap!. This does not happen automatically. This module will cover how to save your work if you do not have internet access.

If you have internet access, you can save your work online using a Snap! cloud account (steps 3-?). Otherwise, you can export your work and save it to your computer or a USB drive (steps ?-?)

Step 2

If you don’t have internet access, you can save your work by exporting a file. First, set your browser to ask you where to download files. This will make it easier to save your programs.

Step 3

Go to File and then Export project. Give your program a descriptive name.

Step 4

Select the folder or USB drive where your program should be saved. The video shows a program being saved to a USB drive. The name of the exported file will end in .xml. You must export a new version of your file every time you want to save it.

Step 5

To load a project that you previously exported. Go to File and then Import. Select the name of your project.