Arduino Sensor Library

 

Using a combination of the OpenSensorHub (OSH) Arduino helper classes (https://github.com/opensensorhub/osh-arduino) and the Adafruit Unified Sensor Library ( https://github.com/adafruit/Adafruit_Sensor ), it is straightforward to develop drivers to enable all supported Arduino sensors to register with OSH SOS-T. Most took no more than 10-15 minutes to add.

When properly configured, these Arduino sensors can push observations to an OSH node over WiFi using the transactional components of an SOS service (SOS-T). Then all of the power of OSH is available, including storage, processing, and serving of the data through standard web or IoT interfaces.

To use supported Arduino sensors for OSH, one would:

  1. The SOS-T server which will receive the data, is referenced in the sketch within the newSOSClient method call. e.g. sos = new SOSClient(client, 192.168.0.25, 8181, /sensorhub/sos);  
  2. flash the Arduino “sketch” file for the appropriate sensor onto the board
  3. restart the Arduino board; it will then register with OSH and send observations until you power it off

The following Arduino sensors are currently supported by OSH and have been tested using an ESP8266 WiFi module:

  • ADXL345 accelerometer
  • MMA8451 accelerometer
  • BMP180 barometric pressure sensor
  • BNO055 orientation sensor
  • DHT11 temperature/relative humidity sensor
  • DHT22 temperature/relative humidity sensor
  • HMC5883 magnetometer
  • L3GD20H gyroscope
  • TSL2561 light sensor
  • TSL2591 light sensor

The integration of these sensors allows us to take advantage of the low cost and low power consumption of the Arduino to efficiently add a wide variety of sensors to the SensorWeb.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: