GY-63_MS5611/libraries/rain/examples/rain_demo/rain_demo.ino

40 lines
655 B
Arduino
Raw Normal View History

2022-12-04 11:55:37 -05:00
//
// FILE: rain_demo.ino
// AUTHOR: Rob Tillaart
2022-12-06 05:26:48 -05:00
// PURPOSE: demo read + percentage
2022-12-04 11:55:37 -05:00
// URL: https://github.com/RobTillaart/RAIN
#include "rain.h"
RAIN RS(A0);
void setup()
{
Serial.begin(115200);
while (!Serial);
Serial.println(__FILE__);
Serial.print("RAIN_LIB_VERSION: ");
Serial.println(RAIN_LIB_VERSION);
Serial.println("EXPERIMENTAL:");
RS.begin(5.000, 1023);
2022-12-06 10:57:55 -05:00
// measured in an earlier run, adjust to your calibration.
RS.setDryReference(3.5);
2022-12-04 11:55:37 -05:00
}
void loop()
{
Serial.print(RS.read(), 3);
Serial.print('\t');
Serial.print(RS.percentage(), 1);
Serial.print('\n');
delay(1000);
}
// -- END OF FILE --
2022-12-06 10:57:55 -05:00