From 6d73e5e1295961992ebc6c249a56e2ce4e1d7aa0 Mon Sep 17 00:00:00 2001 From: Michael Elliot Braun Date: Mon, 25 Apr 2016 11:51:47 -0700 Subject: [PATCH] update chartting --- docs/lessons/charting.1.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 docs/lessons/charting.1.md diff --git a/docs/lessons/charting.1.md b/docs/lessons/charting.1.md new file mode 100644 index 00000000..28162c00 --- /dev/null +++ b/docs/lessons/charting.1.md @@ -0,0 +1,36 @@ +# charting lesson + +Measure the acceleration on the micro:bit in the "z" direction. + +## Topic + +Acceleration + +## Quick Links + +* [activity](/lessons/charting/activity) + + +## Prior learning/place of lesson in scheme of work + +Learn the functions of **on data received**, **send number** and **receive number** and chart `plot bar graph` for `acceleration` in the "x" dimension. + +## Documentation + +```cards +basic.showNumber(0) +input.acceleration(Dimension.X) +led.plotBarGraph(0, 1023) +radio.onDataReceived(() => {}) +radio.sendNumber(0) +radio.receiveNumber() +``` + +## Objectives + +* learn how to repeat code in the background forever +* learn how to get the acceleration value (g-force), in one of three specified dimensions +* learn how to display a vertical bar graph based on the value and high value. +* learn how to register code to run when a packet is received over radio +* learn how to broadcast a number data packet to other micro:bits connected via radio +* learn how to read the next radio packet as a number data packet