Controlling Our Measurement Device

After adding the status LEDs and the control button we implemented the control logic:

IOT15_Controlling_new

Sensing: As soon as the GPS and sensor data of all sensors is available (in real-time) at the server-PI it saves the data in CSV files (see this post for details).

Uploading: When the messbox is in “Ready”-state, CSV files exist and the web server is responding to a ping the server-PI tries to upload the CSV files through Websocket. When the upload is successful the CSV files get deleted.

Advertisements

Testing the current state of the messbox

After working on the server-PI and sensor-PIs separately and often virtualized we decided that it’s time to put the messbox together and see what happens.

iot_glue_setup

The PIs boot and connect automatically. The sensor-PIs directly start sensing and forward the data to the server-PI who reads the GPS data and writes the received sensor data to csv files as soon as all sensors are connected.

iot_glue_screenshot

Here you have a sample csv log file which contains a quake around the timestamp 707020657 (line 844): sample csl file

The format of the csv file is:

sampleID, timestamp, sensorName (GPS), time, lat, lon, speed, course.
sensorName (FL), gyroX,gyroY,gyroZ,acceX,acceY,acceZ,rotaX,rotaY,rotaZ,
sensorName (FR), gyroX,gyroY,gyroZ,acceX,acceY,acceZ,rotaX,rotaY,rotaZ,
sensorName (BL), gyroX,gyroY,gyroZ,acceX,acceY,acceZ,rotaX,rotaY,rotaZ,
sensorName (BR), gyroX,gyroY,gyroZ,acceX,acceY,acceZ,rotaX,rotaY,rotaZ,
measurementID

And here a chart of the test quake:

received_2015-06-07_19-56-44_chart