The example uses the ELECFREAKS Octopus Noise Sensor displayed below:
The breakout boards provided for this presentation may differ from the one presented below. The breakout boards from DFRobot have a green pin instead of a yellow pin for the GPIO. Nevertheless, this demonstration's functionality is the same, as the order is still SVG.
Connect the water level sensor to pin 1 on the breakout board. The black pin (GND) should be connected to the black wire.
Select the Extensions in the Blocks Toolbox.
Search for the datalogger extension and select it.
The datalogger blocks are now available in the Blocks Toolbox.
Note
THIS EXTENSION IS NOT USED TO READ THE ANALOG VALUE OF THE POTENTIOMETER, BUT IS USED TO READ THE OTHER SENSORS.
The Octopus blocks are now available in the Blocks Toolbox.
Drag the mirror data to serial
block from Data Logger
into the on start
block:
Select the set columns
block from Data Logger
. Drag it under the mirror data to serial
block:
Name the column.
Get an every <500> ms
block from Loops
(green):
Get two if < > then
blocks from Logic
(teal):
Get two block < > is pressed
blocks from Input
. Place them in the open space of the if < > then
blocks. Make sure that one is A
and one is B
.
Get a log data < >
block from Data Logger
Place it in the if button <A> is pressed then
block.
Name the column the same name as in Step 4:
Drag an Octopus block in as the value:
Add a delete log
block in the if button <b> is pressed
block.
All done
Here is the full code:
Here are the sensors that are available to tinker with in this presentation. The code will be the same as above with a sensor-specific code. For example:
DHT11 Temperature and Humidity Sensor