-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
31db2e7
commit 021d938
Showing
9 changed files
with
151 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
platforms: | ||
rpipico: | ||
board: rp2040:rp2040:rpipico | ||
package: rp2040:rp2040 | ||
gcc: | ||
features: | ||
defines: | ||
- ARDUINO_ARCH_RP2040 | ||
warnings: | ||
flags: | ||
|
||
packages: | ||
rp2040:rp2040: | ||
url: https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json | ||
|
||
compile: | ||
# Choosing to run compilation tests on 2 different Arduino platforms | ||
platforms: | ||
# - uno | ||
# - due | ||
# - zero | ||
# - leonardo | ||
# - m4 | ||
- esp32 | ||
# - esp8266 | ||
# - mega2560 | ||
# - rpipico | ||
|
||
libraries: | ||
- "printHelpers" |
50 changes: 50 additions & 0 deletions
50
examples/ACD10_readSensor_wire1/ACD10_readSensor_wire1.ino
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
// | ||
// FILE: ACD10_readSensor.ino | ||
// AUTHOR: Rob Tillaart | ||
// PUPROSE: test basic behaviour and performance | ||
|
||
|
||
#include "Wire.h" | ||
#include "ACD10.h" | ||
|
||
|
||
ACD10 mySensor(&Wire1); | ||
|
||
|
||
void setup() | ||
{ | ||
Serial.begin(115200); | ||
Serial.println(); | ||
Serial.println(__FILE__); | ||
Serial.print("ACD10_LIB_VERSION: "); | ||
Serial.println(ACD10_LIB_VERSION); | ||
|
||
Wire1.begin(); | ||
mySensor.begin(); | ||
} | ||
|
||
|
||
void loop() | ||
{ | ||
// prepare a request every 5 seconds. | ||
if (millis() - mySensor.lastRead() > 5000) // millis | ||
{ | ||
mySensor.requestSensor(); | ||
} | ||
|
||
// if request has had enough time read the sensor. | ||
if (mySensor.requestReady()) | ||
{ | ||
mySensor.readSensor(); | ||
Serial.print(mySensor.getCO2Concentration()); | ||
Serial.print("\t"); | ||
Serial.print(mySensor.getTemperature()); | ||
Serial.println(); | ||
} | ||
|
||
// do other things here. | ||
delay(1000); | ||
} | ||
|
||
|
||
// -- END OF FILE -- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters