Security
Secure data upload to openSenseMap
Information on connecting and programming the sensors, Bees and other components
With the microSD-Bee the data of the senseBox can be stored on an SD card.
Make sure that the mSD-Bee is connected to the XBEE2 connector of the senseBox-MCU, otherwise you may have problems saving your measured values.
Information on programming the SD-Bees with Blockly can be found here.
In the following example we will show you how to save your data on an SD card.
// Inviting the libraries
#include <SPI.h>
#include <SD.h>
#include "SenseBoxMCU.h"
HDC1080 hdc;
File myFile;
// Name of the file on the SD card
// Make sure that this name (without file extension) is not longer than 8 letters!
String fileName = "SenseBox.txt"
void setup()
{
// Starting the SD-Bee
SD.begin(28);
// Open the file on the SD card
myFile = SD.open(fileName, FILE_WRITE);
myFile.close();
hdc.begin();
};
void loop()
{
// Open file with write access
myFile = SD.open(fileName, FILE_WRITE);
myFile.println(hdc.getTemperature());
// The file is closed again after use
myFile.close();
};