Hummingbird Bit: BirdBlox Lessons
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.
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.
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.
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.
If you are using a battery pack to power to the Bit, the battery indicator will tell you when you need to change the batteries. If it is yellow, you need to change your batteries soon. If it is red, you need to change the batteries immediately.
Creating Sequences with LEDs
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.
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.