For this project, you have two options for coding. You may download the completed code or follow a step-by-step tutorial to code from scratch:

  • Download
  • Tutorial

Explore the code below to get started with your current monitor:

  • Connect your project to the computer and download the code to make it work.
  • Review the code comments on each block to learn about how your solar project works, then try testing it in real life.

Watch the video to learn how to use the CHARGE Battery Pack, the Micro:bit, and CreateAI!

Improve

How would you modify the experiment, or create your own code that includes the following features?

  1. Expand Surfaces: Add an additional surface—can your micro:bit identify it is an unfamiliar falling surface? If no, how might we hone our AI model to get more accurate readings? If yes, how can we adapt the code to account for this new surface?
  2. Add Actions: create a new action for a new surface. Test how well your micro:bit can differentiate between three or more surfaces.
  3. Collect Data: Download this new code and learn how the micro:bit is able to collect the data from its falls. What does this data show us about acceleration strength and the type of material used in the crash pad?
  4. Alter Size and Shape: How does changing he weight, shape, or size of your micro:bit build alter its acceleration speed?