Skip to content

SenseBox

Reinhard Budde edited this page Apr 16, 2019 · 1 revision

Sensebox.

sensorname type
HDC1080 temperature/humidity
BMP280 temperature/pressure
VMEL+TSL UV/light
Microphone sound
Potentiometer voltage
Photoresistor light
Button touch
HC-SR04 ultrasonic
BMX055 accelerometer/gyroscope/compass
actorname type
OLED-display display
LED LED
RGB LED RGB LED
Piezo element buzzer
specialname type
MicroSD-bee file logger
WiFi-bee wireless connection
SPI SPI interface
Serial serial interface

Additional hardware not included in edu version:

name type
CAM-M8Q gps receiver
LoRa-bee wireless connection
LAN-bee ethernet connection
SDS011 air quality sensor
SERVO servo motor
Stepper stepper motor

Notes on SD card usage:

  1. It is possible to create a file by opening the file and closing it back
SD.begin(28);
dataFileqwert = SD.open("file.txt", FILE_WRITE);
dataFileqwert.close();
  1. Blockly block that has scope is provided for writing data to sd card, in it's scope the file is open and write blocks are possible to be put in.
dataFileqwert = SD.open("qwert.txt", FILE_WRITE);
  dataFileqwert.println("test");
dataFileqwert.close();

Notes on WiFi usage:

  1. Wifi connection is allowed to be establsihed only in setup() function:
  Bee* b = new Bee();

  void setup() {
  b->connectToWifi("SSID","Password");
  delay(1000);
  }

delay should be necessary in order to wait for the connection is established. Usually connections are checking for the status and the wait until the connection is established, not wait some fixed amount of time.

  1. Connect with openSenseMap block seems to do nothing when additional blocks are inserted in it's scope. It only instantiates an object of type OpenSenseMap:
Bee* b = new Bee();
OpenSenseMap osem("BoxID",b);
  1. Later this object can be used to upload data:
osem.uploadMeasurement("Value","SensorID");

This block must be used only in a loop. Why? Also, it is actually in a loop.

  1. In order to send data with GPS fix another method should be called:
osem.uploadMobileMeasurement("Keine Eingabe","SensorID",0,0);

Notes on the display usage:

  1. Display needs to be initialised first and then a scope block used, to used desired data-generation blocks so they would be then finished by the .display() call.
Clone this wiki locally