1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
#include "DFRobot_EOxygenSensor.h"
#define OXYGEN_I2C_ADDRESS E_OXYGEN_ADDRESS_0 DFRobot_EOxygenSensor_I2C oxygen(&Wire, OXYGEN_I2C_ADDRESS);
void setup() { Serial.begin(115200); while(!Serial); while(!oxygen.begin()){ Serial.println("NO Deivces !"); delay(1000); } Serial.println("Device connected successfully !"); }
void loop() { Serial.print("oxygen concetnration is "); Serial.print(oxygen.readOxygenConcentration()); Serial.println("% VOL"); delay(1000); }
|