Skip to content

Commit 7a0ece2

Browse files
committed
minor edits
1 parent 357371e commit 7a0ece2

File tree

3 files changed

+20
-13
lines changed

3 files changed

+20
-13
lines changed

libraries/AGS02MA/.arduino-ci.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ compile:
22
# Choosing to run compilation tests on 2 different Arduino platforms
33
platforms:
44
- uno
5-
- leonardo
6-
- due
7-
- zero
5+
# - due
6+
# - zero
7+
# - leonardo
8+
- m4
9+
- esp32
10+
# - esp8266
11+
# - mega2560

libraries/AGS02MA/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
[![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/RobTillaart/AGS02MA/blob/master/LICENSE)
55
[![GitHub release](https://img.shields.io/github/release/RobTillaart/AGS02MA.svg?maxAge=3600)](https://github.com/RobTillaart/AGS02MA/releases)
66

7+
78
# AGS02MA
89

910
Arduino library for AGS02MA TVOC sensor.
@@ -97,7 +98,7 @@ Simplified formula for 1 atm @ 25°C:
9798
Some known gasses
9899

99100
| gas | ratio | molecular weight M |
100-
|:--------|:--------------------|-------------------:|
101+
|:--------|:--------------------|:------------------:|
101102
| SO2 | 1 ppb = 2.62 μg/m3 | 64 |
102103
| NO2 | 1 ppb = 1.88 μg/m3 | 46 |
103104
| NO | 1 ppb = 1.25 μg/m3 | 30 |

libraries/AGS02MA/examples/AGS02MA_minimal_plotter/AGS02MA_minimal_plotter.ino

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
//
22
// FILE: AGS02MA_minimal_plotter.ino
33
// AUTHOR: Rob Tillaart
4-
// VERSION: 0.1.0
54
// PURPOSE: test application
65
// DATE: 2021-09-23
76
// URL: https://github.com/RobTillaart/AGS02MA
@@ -30,15 +29,14 @@ void setup()
3029

3130
void loop()
3231
{
33-
delay(3000);
3432
Wire.requestFrom(26, 5);
3533
for ( int i = 0; i < 5; i++)
3634
{
3735
buffer[i] = Wire.read();
3836
// Serial.print(buffer[i], HEX); // for debugging.
3937
// Serial.print('\t');
4038
}
41-
Serial.println();
39+
// Serial.println();
4240

4341
if (cnt == 0)
4442
{
@@ -47,12 +45,16 @@ void loop()
4745
cnt = 20;
4846
}
4947
cnt--;
50-
Serial.print(buffer[0]);
51-
Serial.print("\t");
52-
Serial.print(buffer[1] * 65536UL + buffer[2] * 256 + buffer[3]);
53-
Serial.print("\t");
54-
Serial.print(buffer[4]);
55-
Serial.println();
48+
if (buffer[0] == 0x10)
49+
{
50+
Serial.print(buffer[0]);
51+
Serial.print("\t");
52+
Serial.print(buffer[1] * 65536UL + buffer[2] * 256 + buffer[3]);
53+
Serial.print("\t");
54+
Serial.print(buffer[4]);
55+
Serial.println();
56+
delay(2000);
57+
}
5658
}
5759

5860
// -- END OF FILE --

0 commit comments

Comments
 (0)