Any chance someone could provide some further guidance. I’ve only worked with the particle.io web ide, and I seem to be stuck.
I’ve created a new ‘app’, and trying to include the library
AirQualityWing
Description
All inclusive library developed for the Air Quality Wing for Particle Mesh. It enables you to measure TVOC, eC02, temperature, humidity, PM2.5 and PM10 particulate density. Check out the usage example for a quick start using the Air Quality Wing. Don’t have one? Check out this project link to grab one!. Library that works with the Air Quality Wing for Particle Mesh.
Versions
1.0.2
1.0.1
1.0.0
But it does not seem to flash, I’m using a P2 Device OS: 5.50
WebIDE Error:
In file included from grainbinmonitoronline.ino:2:
lib/AirQualityWing/src/AirQualityWing.h:6:21: warning: “PLATFORM_XENON” is not defined, evaluates to 0 [-Wundef]
6 | #if (PLATFORM_ID ≠ PLATFORM_XENON) && (PLATFORM_ID ≠ PLATFORM_ARGON) && (PLATFORM_ID ≠ PLATFORM_BORON)
| ~~~~~~~~~~
lib/AirQualityWing/src/AirQualityWing.h:7:2: error: #error The Air Quality Wing Library only supports Xenon, Argon and Boron.
7 | #error The Air Quality Wing Library only supports Xenon, Argon and Boron.
How would I update the webide library to include the p2? or get around this validation check?
// This #include statement was automatically added by the Particle IDE.
#include <AirQualityWing.h>
/*
- Project Air Quality Wing Library Example
- Description: Basic example using the Air Quality Wing for Particle Mesh
- Author: Jared Wolff (Circuit Dojo LLC)
- Date: 10/27/2019
- License: GNU GPLv3
*/
#include “board.h”
// SYSTEM_MODE(SEMI_AUTOMATIC);
// Logger settings
SerialLogHandler logHandler(115200,
LOG_LEVEL_WARN,
{
{“app”, LOG_LEVEL_INFO},
{“sgp40”, LOG_LEVEL_INFO},
{“shtc3”, LOG_LEVEL_WARN},
});
// AirQualityWing object
AirQualityWing AirQual = AirQualityWing();
// Handler is called in main loop.
// Ok to run Particle.Publish
static void AirQualityWingEvent()
{
Log.info(AirQual.toString());
Particle.publish(“aqw”, AirQual.toString(), PRIVATE, WITH_ACK);
}
// setup() runs once, when the device is first turned on.
void setup()
{
// Set up PC based UART (for debugging)
Serial.blockOnOverrun(false);
Serial.begin();
while (!Serial.isConnected())
{
delay(100);
}
// Set up I2C
Wire.setSpeed(I2C_CLK_SPEED);
Wire.begin();
// Default settings
AirQualityWingSettings_t defaultSettings =
{
10000, //Measurement Interval
true, //Has HPMA115 (PM2.5)
true, //Has SGP40 (VOC)
true, //Has SHTC3 (Temp/humidity)
HPMA1150_EN_PIN //HPMA int pin
};
// Setup & Begin Air Quality
AirQual.setup(AirQualityWingEvent, defaultSettings);
AirQual.begin();
// Startup message
Serial.println(“Air Quality Wing”);
}
// loop() runs over and over again, as quickly as it can execute.
void loop()
{
// uint32_t err_code = AirQual.process();
// if (err_code ≠ success)
// {
//switch (err_code)
//{
//case shtc3_error:
Particle.publish("shtc3", PRIVATE, NO_ACK);
//Log.error("Error shtc3");
//case hpma115_error:
Particle.publish("hpma115", PRIVATE, NO_ACK);
//Log.error("Error hpma115");
//case sgp40_error:
Particle.publish("sgp40", PRIVATE, NO_ACK);
//Log.error("Error sgp40");
//default:
//break;
//}
//}
}