Development v12

Warning - Product Update

All the resources present on this section belong to Waspmote v12, Waspmote Plug & Sense! v12 and Meshlium v3.8.

If you have a Waspmote v15, Waspmote Plug & Sense! v15 or Meshlium v4.0 please go to the new Development Section.

Check what is your version and what are the differences between the old and the new one in this document.

» SW 04: Dissolved Oxygen

Turn on the Smart Water Board and reads the Dissolved Oxygen sensor printing the result through the USB

Required Materials

1 x Waspmote
1 x Battery
1 x Smart Water Sensor Board
1 x Dissolved Oxygen Sensor
1 x Dissolved Oxygen Calibration kit (optional)


- The calibration air and zero values selected in the code are an example for a specific sensor, each unit will require its own calibration parameters.
- A single point calibration with only calibration in air will be sufficient for most applications, in that case introduce a '0' as zero point calibration.
- This example is valid for Waspmote v12 and Waspmote v15


 *  ------ [SW_04] - Dissolved Oxygen sensor Reading for Smart Water-------- 
 *  Explanation: Turn on the Smart Water Board and reads the Dissolved Oxygen
 *  sensor printing the result through the USB
 *  Copyright (C) 2016 Libelium Comunicaciones Distribuidas S.L. 
 *  This program is free software: you can redistribute it and/or modify 
 *  it under the terms of the GNU General Public License as published by 
 *  the Free Software Foundation, either version 3 of the License, or 
 *  (at your option) any later version. 
 *  This program is distributed in the hope that it will be useful, 
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of 
 *  GNU General Public License for more details. 
 *  You should have received a copy of the GNU General Public License 
 *  along with this program.  If not, see <>. 
 *  Version:           3.0
 *  Design:            David Gascón 
 *  Implementation:    Ahmad Saad

#include <WaspSensorSW.h>

float DOVol;
float DOValue;

// Calibration of the sensor in normal air
#define air_calibration 2.65
// Calibration of the sensor under 0% solution
#define zero_calibration 0.0

DOClass DOSensor;

void setup()
  USB.println(F("DO example for Smart Water..."));
  // Configure the calibration values
  DOSensor.setCalibrationPoints(air_calibration, zero_calibration);

  // 1. Turn ON the Smart Water sensor board 

void loop()

  // 2. read the sensors
  // Reading of the ORP sensor
  DOVol = DOSensor.readDO();
  // Conversion from volts into dissolved oxygen percentage
  DOValue = DOSensor.DOConversion(DOVol);

  // 3. Print the output values
  // Print of the results
  USB.print(F("DO Output Voltage: "));
  // Print of the results
  USB.print(F(" DO Percentage: "));



DO Output Voltage: 2.4906055927 DO Percentage: 95.4660186767

Quick Publish: