So - back to teaching the kids how to code - and in the latest lesson we introduce the accelerometer.
To start with I wanted them to see how the accelerometer behaved as the micro:bit was moved around, so we output the values to the serial port and started up the console monitor. (The example below shows the simulator, but during the lesson, we were connected to the micro:bit and viewing the remote console.)
|
Code to write accelerometer values to serial port
|
|
Output from serial port on console monitor
|