SD-Bee

With the microSD-Bee the data of the senseBox can be stored on an SD card.

/images/2020-03-11-bee-sd/msd.png - Logo

Technical information

  • “Plug-in-and-Go” senseBox compatible
  • Port for miniSD card
  • Description: mSD-Bee
  • Dimensions: 24mm x 21mm x 9mm
  • Weight: 2.4 g

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.

Programming (Blockly)

Information on programming the SD-Bees with Blockly can be found here.

Programming (Arduino)

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();
};
×

Subscribe

The latest tutorials sent straight to your inbox.