Simulators are digital versions of the sensors/components to allow you to test everything directly in MakeCode
In the past, to test your code from MakeCode that interacted with any kind of hardware (like a motor, dial, button, LED display, etc.) you would have to:- Code your project
- Download the code to the micro:bit
- Test and see if the code is working
You would often have to do this several times over and over again until you got your code just right.
With the simulators, you can now test your code solely within MakeCode so you and your students can be confident it will be working the first time.
To see the Climate Action Kit simulators, you first must add the Forward Education extension:
- In a new MakeCode Project, head to the bottom of the drawers and click on the one labelled Extensions
- Search for the Forward Education Extension by searching "forward" "Forward Education" or "fwd-edu"
- It will now load the extension and you'll see 2 more drawers: Sensors and Motors.
Now when the breakout board is turned on, micro:bit is paired and inserted into the breakout board, the physical sensors plugged into the sensor ports with show up virtually under the micro:bit simulator on the left side of the workspace. The servo and pump simulators work a little differently than our smart sensor components so they will show up anytime the breakout board is on and the micro:bit is plugged in (this is a good way to test that the simulators or working properly)
Now that the simulators are active, you will be able to see any of the sensors you plug in without needing to turn the board off and on, it will just update as you add or remove components. Now when you interact with a sensor like the solar sensor by covering the light sensor, blocking the light, you'll see the % value decrease.