first commit
This commit is contained in:
commit
5893b00dd2
1669 changed files with 1982740 additions and 0 deletions
|
|
@ -0,0 +1,43 @@
|
|||
/**
|
||||
* @file Unit_BPS1.1_M5AtomS3Lite.ino
|
||||
* @author SeanKwok (shaoxiang@m5stack.com)
|
||||
* @brief
|
||||
* @version 0.1
|
||||
* @date 2024-01-30
|
||||
*
|
||||
*
|
||||
* @Hardwares: M5AtomS3Lite + Unit BPS 1.1
|
||||
* @Platform Version: Arduino M5Stack Board Manager v2.1.0
|
||||
* @Dependent Library:
|
||||
* M5UnitENV: https://github.com/m5stack/M5Unit-ENV
|
||||
*/
|
||||
|
||||
#include "M5UnitENV.h"
|
||||
|
||||
QMP6988 qmp;
|
||||
|
||||
void setup() {
|
||||
Serial.begin(115200);
|
||||
|
||||
if (!qmp.begin(&Wire, QMP6988_SLAVE_ADDRESS_L, 2, 1, 400000U)) {
|
||||
Serial.println("Couldn't find QMP6988");
|
||||
while (1) delay(1);
|
||||
}
|
||||
}
|
||||
|
||||
void loop() {
|
||||
if (qmp.update()) {
|
||||
Serial.println("-----QMP6988-----");
|
||||
Serial.print(F("Temperature: "));
|
||||
Serial.print(qmp.cTemp);
|
||||
Serial.println(" *C");
|
||||
Serial.print(F("Pressure: "));
|
||||
Serial.print(qmp.pressure);
|
||||
Serial.println(" Pa");
|
||||
Serial.print(F("Approx altitude: "));
|
||||
Serial.print(qmp.altitude);
|
||||
Serial.println(" m");
|
||||
Serial.println("-------------\r\n");
|
||||
}
|
||||
delay(1000);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue