added streaming page

This commit is contained in:
Peli de Halleux 2016-06-23 23:22:46 -07:00
parent 9378e5e90c
commit 8d5c5daaaf
2 changed files with 41 additions and 5 deletions

View File

@ -23,13 +23,13 @@ When you have downloaded and run your code onto your micro:bit, press Button R t
### USB connection
When you plug in your micro:bit, it should appear as MICROBIT.
When you plug in your micro:bit, it should appear as ``MICROBIT``.
If you accidentally hold down the reset button as youre plugging in your micro:bit,
the micro:bit will appear as a MAINTENANCE drive instead of MICROBIT. This is known as maintenance mode.**
the micro:bit will appear as a MAINTENANCE drive instead of ``MICROBIT``. This is known as maintenance mode.**
To continue programming your micro:bit YOU MUST unplug your USB and reconnect it. Check that the drive now shows as MICROBIT.
To continue programming your micro:bit YOU MUST unplug your USB and reconnect it. Check that the drive now shows as ``MICROBIT``.
**Use with caution. If you click on the drive while it shows as MAINTENANCE,
**Use with caution. If you click on the drive while it shows as ``MAINTENANCE``,
you can see which version of firmware you have running on your micro:bit.
Firmware on your micro:bit should be up-to-date already.
You can find the version of firmware in the 'version.txt' file on the micro:bit. Further information on the firmware can be found here:
@ -55,6 +55,10 @@ The pins can be a form of input or output.
There are labels for the input/output pins P0, P1, P2, which you can attach external sensors to such as thermometers or moisture detectors.
You can read more about large and small pins [here](/device/pins).
### Light level
The screen can also be used a light level sensor (it's a really cool trick).
### How do I connect the micro:bit to my computer?
Your micro:bit can be connected to your computer via a micro USB cable.
@ -73,7 +77,7 @@ You can attach an external device such as a motor to these and power it using th
### Serial Communication
The BBC micro:bit can send an receive data via [serial communication](/device/serial). The serial data can be transfered via USB or BlE.
The BBC micro:bit can send an receive data via [serial communication](/device/serial). The serial data can be transfered via USB or BLE.
### Bluetooth Low Energy (BLE) Antenna

32
docs/streaming.md Normal file
View File

@ -0,0 +1,32 @@
# Streaming
This page describes how to stream data from the micro:bit to the editor or even to the cloud.
## Before starting...
Make sure you follow the instructions on [how to setup a serial connection](/device/serial) with the micro:bit.
## A typical scenario
A common scenario is to chart some sensor data, such as the acceleration, and analyse it in the editor.
For example, run this code on your micro:bit.
```blocks
basic.forever(() => {
led.plotBarGraph(input.acceleration(Dimension.X), 0);
});
```
If your serial connection is working, you will start to see a chart representing that acceleration ``x`` value read from the micro:bit.
Each time ``led.plotBarGraph`` is called, the value is also written to the serial output. The log view automatically detects
that there is a data stream and displays a graph.
## Local download
The log view will automatically start to collect and organize the data it detects. Simply click on the log view to open the various options
to export the data. The simplest option is to download the data as a **CSV file**. This file can easily be opened in programs like Office Excel.
## Cloud upload
In the data export dialog, there is another option to upload the data to the cloud. This allows to upload small amounts of data
without any kind setup. The data can be accessed via web services or directly from Office Excel.