DATA VISUALIZATION
Discover how Canadian environmental data can help us make better decisions in solving the problem of climate change by building a maker exercise using the micro:bit hardware.
HOW IT WORKS
1. FREE CLASSROOM KITS
Hey Educators, we’re giving away FREE classroom kits for eligible teachers! Kits come with all the tools, electronics, and micro:bits you need for this workshop, a value of $650!
One kit per classroom, each class must fill out a pledge form.
2. LESSON PLANS & CLASSROOM VISITS
Haven’t taught with micro:bits? Unsure of where to begin? Our partners at Kids Code Jeunesse (KCJ) are here to support you! They have developed ENGLISH and FRENCH lesson plans for this Data Visualization Activity. You can also book a consultation/ troubleshooting session with a KCJ instructor for your class!
3. DATA VISUALIZATION PROJECTS
Once you've recieved your kit, explore tons of customizable visualization projects below! Find a topic you are passionate about and learn the data behind that project to tell your story using micro:bits, makecode, and electronics. Each project has tailored makecode and instructions for you to get started.
DATA VISUALIZATION PROJECTS
HARDWARE SETUP SUPPORT
FOR TEACHERS – FREE HARDWARE FOR YOUR CLASSROOMS
Assembly Instructions
Now that you have your electronics and templates, you are ready to put your project together. Follow the instructions to set up your projects!
How to Attach Batteries to a micro:bit
Click to download the assembly instructions PDF: How to Attach Batteries to a Microbit
How to Assembly Your Servo Pointer Project
Click to download the assembly instructions PDF: How to Assembly Your Servo Pointer Project
How to Assembly Your Neopixel Grid Project
Click to download the assembly instructions PDF: How to Assembly Your Neopixel Grid Project
How to Assembly Your Neopixel Ring Project
Click to download the assembly instructions PDF: How to Assembly Your Neopixel Ring Project
How to Assembly Your Fairy Light Project
Click to download the assembly instructions PDF: How to Assembly Your Fairy Light Project
How to Connect Micro:bit to Electronics
No matter what electronics package you have, we’ve made setting up your project as easy as 1-2-3.
1. DOWNLOAD CODE
When you’ve selected the data set and region you wish to use, clicking on the link will take you to a page that displays the compiled code for the project.
A. Click the Edit Code button The button is located at the top right corner to be taken to the makecode website. On this page. you can download the code to your micro:bit – or if you are inclined, you edit the code yourself to change the project however you like. Note by changing the code, Steamlabs cannot guarantee the project will work as the intended |
|
B. Download Code The most reliable way is to click on the large blue Download button in the lower left corner of the screen |
|
C. Save your code as a .hex file to your computer. When your micro:bit is plugged in, it will create a separate drag-and-drop storage drive to easily save your projects. Open up the location you downloaded the file to, and drag it into the Micro:bit drive folder (or save it directly to the Micro:bit drive if you don’t wish to save your files locally). |
|
D. Upload You will see a progress bar pop up, and blinking lights on the back of the micro:bit, and now your project has been uploaded. Congratulations! Optional: If you are using a browser that supports WebUSB (like Chrome or Edge), you have a second, slightly faster option for downloading and updating code Click on the gear icon in the top right of the screen, and in the drop-down menu, select Connect Device |
|
E. Select your micro:bit The website will guide you through the rest of the process; all you need to do is select your micro:bit when prompted, and afterward, anytime you press the download button in the lower right corner, it will automatically send to your micro:bit and update the code. |
2. CONNECT YOUR CODE TO MICRO:BIT
Neopixels (Grid, Ring, Strip)
CONNECTING YOUR MICRO:BIT
To hook up the neopixel to your micro:bit, first locate your connector wires.
One end has three alligator clips that can be hooked up to the circle pins on the bottom of the micro:bit, and the other end has a special JST connector with three small metal pins.
Your neopixel will also have wires attached to the back with tiny writing above – in most cases, it will actually have two sets, though you only need one – you need to find the set of wires that has a Di or Din above it. This stands for Digital Input.
Connect your neopixels to your bundled wires using the JST connector; it should easily snap together and lock in place. Now it’s just a matter of following the wires and connecting them to the correct pins on the micro:bit.
From the neopixel:
|
OPTIONAL: These connectors can become loose or even snap over time due to mishandling or heavy usage. To ensure the long life of your neopixels, it is recommended to add a dab of hot glue over the wire connection on the neopixel.
WHERE TO PLACE ELECTRONICS ON TEMPLATE
GridYou’ll notice that once the code has been downloaded, your neopixel grid should have a strip of LEDs light up on one side. This is the Legend bar and should be oriented to fit the map template you selected. Use some tape to keep the grid from sliding out of place. |
|
RingUpon starting up the project, you’ll notice a single flashing LED on the neopixel ring. This LED needs to be positioned at the bottom of the ring cutout on the activity and secured in place with a bit of tape |
|
Fairy Light StripThe orientation of this project is up to you! Attach it to your project in any way that makes sense to you – you’re the visualization expert here! |
Servo Motor
CONNECTING YOUR MICRO:BIT
To hook up the servo to your micro:bit, first locate your connector wires.
One end has three alligator clips that can be hooked up to the circle pins on the bottom of the microbit, and the other end has a special JST connector with three small metal pins. Grab the servo motor and connect the wire to the pin end of your connector cable. Now it’s just a matter of following each wire and connecting the alligator clip to the correct Micro:bit pin.
From the servo motor:
|
WHERE TO PLACE ELECTRONICS ON TEMPLATE
The servo motor will fit into the [activity/envelope] by placing it through the hole in the front. Thread the wiring through first, then the body – make sure the white bump for the servo arms is closer to the bottom of the activity. You can then attach the servo arm to top of the servo. They will snap on tightly, but for added security, use the micro screws that accompany the servo motor to lock you choice of arm in place. |
3. ASSEMBLE PROJECT!
Troubleshooting
Are you having issues with your activity? Try these helpful [ideas] to get your project back on track!
MY CODE WON'T DOWNLOAD
- Check to see if your micro:bit is functioning. There should be a small red light under the USB port while it is plugged into a computer
- Ensure the firmware is up to date. For more information, please visit microbit.org/get-started/user-guide/firmware/
- Make sure there is no external battery plugged into the microbit
THE ELECTRONICS WON'T LIGHT UP
- You may just need to redownload your code.
- Sometimes there may be a corruption error when downloading to the microbit. Remedy this by downloading the code again, but using the option to manually drag the .hex file from your downloads folder onto the micro:bit drive.
-
- Look for flashing lights on the back of your micro:bit. These indicate a data transfer
- Check your wiring
- Follow the instructions above to make sure you have connected the correct wires to their pins on the micro:bit
- Check the connections on the electronics
- Sometimes, the wires connected on the back of the neopixel can break and come loose. Unfortunately, these parts will either need to be resoldered or replaced
- Solder: Simply solder the wires back to the connector pads, paying careful attention to ensure the connectors don’t touch
- Purchase: Replacement parts can also be found at many stores including adafruit, amazon (links), and local electronics retailers
- Sometimes, the wires connected on the back of the neopixel can break and come loose. Unfortunately, these parts will either need to be resoldered or replaced
-
- Protecting the connections
- To ensure the connections don’t break from misuse, place a bead of hot glue over the soldered connections on the micro:bit to protect them
- Protecting the connections
SERVO DOESN'T POINT CORRECTLY
- Download THIS code to your microbit.
- Hold the servo like the photo below, so the white servo arm connector is closer to the bottom
- With a servo connected, button A will point to 0 degrees, and B to 180. Use this to test if the servo is functional (it looks reversed in the code because we have oriented the servo upside down – refer to the arrows on the microbit LED screen to make sure you’re pointing in the correct direction
- Servos also need at least 4.5v of power to run. If you don’t have a USB connected, make sure you are using a battery pack that can supply this.
- Remove the servo arm and reconnect it so it aligns with one of these directions after you press the button. Your servo should now be calibrated
Hardware Specs
NEOPIXELS
This tool is all about lights, LED lights that we can control using the micro:bit. The LED lights we are using are called NeoPixels.
Neopixels are smart individual colour-changing LEDs and are usually chained together in different shapes and len.
gths, such as rings, strips, and matrixes. Each light is controlled by an integrated circuit that sets the colour and passes the rest of the instructions to the next light
Each neopixel has a red, green and blue light and they can change their intensity (brightness), ranging from 0, no brightness at all to 255, full brightness. This range from 0 to 255 with three lights can reproduce 16.7 million different colours.
These are the different parts of the neopixel in the diagram above:
VDD. This is where the cable with electricity connects to the neopixel.
VSS. This connects the neopixel to the ground line.
DIN. The information travelLing from the micro:bit enters the neopixel via this connector.
DOUT. Once the neopixel has interpreted the signal and given the corresponding instructions to the red, green and blue LEDs, the remaining set of instructions goes out to the next neopixel via this connector.
🔴 Red LED.
🟢 Green LED.
🔵 Blue LED.
Integrated Circuit. This is represented by the gray rectangle in the image above. The integrated circuit is the brain of the neopixel and it is in charge of:
- Receiving information from the micro:bit or the previous neopixel.
- Telling each LED how bright it should be.
- Passing the remaining commands to the next neopixel.
SERVO MOTOR
Electric motors are great, they move many of the devices we have in our daily lives. We find them in things like blenders, washers, dryers, drills, cars, garage doors, pumps and many more. They are also part of one of the tools we are using, the Servo Motor or Servo.
Servos are electrical devices that rotate a part of a machine providing predictable, repeatable and precise movement. Think of them as motors that you can spin with precision, controlling speed and placement.
Servos do have electric motors in them, but they also include other parts that allow them to be moved to specific angles, positions and velocities. We will control our servo motor using a micro:bit, with instructions created on MakeCode.
WHAT IS GENACTION?
GenAction is an initiative of the Inspiring Youth to Climate Action project funded by The Government of Canada’s Climate Action and Awareness Fund. GenAction is led by a strong Partnership Collective of leaders within the science centre sector including: Discovery Centre, the Canadian Association of Science Centres (CASC) – representing over 45 science centres, museums, and information learning organizations across Canada – Science North, and The Exploration Place Museum and Science Centre.
With the support of the Environmental Damages Fund from 2021-2024, GenAction will increase youths’ understanding of climate change science, empower them to take action on climate change, and inspire them to become leaders in climate action now and into the future.