Instructions
Table Of Contents
- Introduction
- Parts
- Using Alligator Clips
- Solar Board Reference
- Project 1 – Sun Finder
- Project 2 – Garden Light
- Project 3 – Self Charging Cooling Fan
- The BBC micro:bit
- Getting Code to Run on the micro:bit
- Project 4 – Adding an Energy Meter
- Project 5 – Energy Logger
- Connecting Up
- Code for the Energy Logger (MakeCode)
- How it works
- Connecting to Your PC
- Pairing Your micro:bit With MakeCode
- Showing the Device Console Graph
- Capturing Data From a Charge and Discharge Cycle
- Downloading Data
- Getting Data into a Spreadsheet Program
- Analysing the Data
- Graphing the Data
- Results
- Understanding the Data
- Understanding Duty Cycle
- How the Solar Store Works
- Project 6 – Intelligent Cooling Fan
- Troubleshooting
- About the Author
- Learning
- Monk Makes Kits
Connecting to Your PC
MakeCode has a useful feature that allows you to stream live data from a micro:bit,
and it will draw a live graph of that data. It also allows you to store the same data in
a file that can be loaded and analysed in other programs.
Pairing Your micro:bit With MakeCode
To use the graphing feature, you first have to pair your micro:bit with MakeCode.
Click on the pair device link on the MakeCode page and follow the on-screen
instructions.
Note: If your micro:bit won't pair, you may need to upgrade the firmware stored on
its USB interface chip. If so, follow the easy step by step instructions here:
https://support.microbit.org/support/solutions/articles/19000019131-upgrade-the-
firmware-on-the-micro-bit
Finally, click download to micro:bit to flash the code directly to your micro:bit.
Showing the Device Console Graph
Now that your micro:bit is paired, it can send serial data over the USB lead to
MakeCode, and you should see a new show console device button.
Press that button and then you should see a live graph of energy data displayed:
Page 24