11//
22// FILE: AGS02MA_calibrate.ino
33// AUTHOR: Rob Tillaart, Beanow
4- // VERSION: 0.2.0
54// PURPOSE: test application
6- // DATE: 2021-08-12
75// URL: https://github.com/RobTillaart/AGS02MA
8- //
6+
97
108#include " AGS02MA.h"
119
12- // You can decrease/disable warmup when you're certain the chip already warmed up.
10+ // You can decrease/disable warmup when you're certain the chip already warmed up.
1311#define WARMUP_MINUTES 6
1412#define READ_INTERVAL 3000
1513
@@ -22,13 +20,12 @@ AGS02MA AGS(26);
2220
2321void setup ()
2422{
25- // ESP devices typically mis the first serial log lines after flashing.
26- // Delay somewhat to include all output.
23+ // ESP devices typically miss the first serial log lines after flashing.
24+ // Delay somewhat to include all output.
2725 delay (1000 );
2826
2927 Serial.begin (115200 );
3028 Serial.println (__FILE__);
31-
3229 Serial.print (" AGS02MA_LIB_VERSION: " );
3330 Serial.println (AGS02MA_LIB_VERSION);
3431 Serial.println ();
@@ -49,7 +46,7 @@ void setup()
4946 Serial.println (version);
5047 int err = AGS.lastError ();
5148
52- // Reading version correctly matters, as we display additional comments based on it.
49+ // Reading version correctly matters, as we display additional comments based on it.
5350 if (err != AGS02MA_OK)
5451 {
5552 Serial.print (" Error reading version:\t " );
@@ -101,7 +98,7 @@ void setup()
10198
10299 delay (1000 );
103100
104- // returns 1 if successful written
101+ // returns 1 if successful written
105102 b = AGS.zeroCalibration ();
106103 Serial.println ();
107104 Serial.print (" CALIB:\t " );
@@ -123,8 +120,8 @@ void setup()
123120
124121 Serial.println ();
125122 Serial.println (" Showing what PPB values look like post calibration." );
126- // A 125 status is typically shown on v118's after they've been powered off.
127- // Either having this version at all, or seeing this status, we'll display a notice.
123+ // A 125 status is typically shown on v118's after they've been powered off.
124+ // Either having this version at all, or seeing this status, we'll display a notice.
128125 if (version == 118 || initialValue.status == 125 )
129126 {
130127 Serial.println (" NOTICE: v118 sensors are known to give different results after powering off!" );
@@ -162,4 +159,5 @@ void printPPB()
162159 Serial.println ();
163160}
164161
165- // -- END OF FILE --
162+
163+ // -- END OF FILE --
0 commit comments