Hi there,
Dashboard
I have a Yun rev 2 measuring the CO2 (MH-Z14A), VOC (ccs-811), NO2 (MiCS-2714), PM2.5 (WaveShare/GP2Y1010AU0F) , O3 (MiCS-2614), Temperature & Humidité (DHT22)... it disseminates the data on a Google Sheet (with a js script, deployed as a web app) and also store them on a SD card. I still have a sensor to implement, the MQ-135 for the carbon monoxyde (CO) but my Yun is full. My sketch requires 28508 octets (99%) of the Yun memory (maximum: 28672 octets).
What would be the best way(s) to reduce memory use in the sketch below ?
/*///////////////////////////////////////////////////////////////////////////////////////////////////
STATION DE MESURE DE LA QUALITE DE L'AIR EN CLASSE (ARDUINO YUN rev 2)
COLLEGE ALPHONSE DAUDET - 06000 NICE (FRANCE)
/////////////////////////////////////////////////////////////////////////////////////////////////////
Paramètres mesurés (& capteurs):
- CO2 (MH-Z14A), - VOC (ccs-811),
- NO2 (MiCS-2714), - PM2.5 (WaveShare/GP2Y1010AU0F)
- O3 (MiCS-2614), - Temperature & Humidité (DHT22)
Index de qualité de l'air basé sur les seuils:
https://www.atmosud.org/article/comprendre-les-indices-pour-quantifier-lair
Le croquis utilise 28508 octets (99%) de l'espace de stockage de programmes (maximum: 28672 octets).
Les variables globales utilisent 1478 octets (57%) de mémoire dynamique (maximum: 2560 octets).
////////////////////////////////////////////////////////////////////////////////////////////////////*/
#include <Adafruit_BMP085.h> // For the BMP180 (Pressure, Temp)erature
#include "Adafruit_CCS811.h" // For the CMJU-811 (VOC)
#include "DHT.h"
#include <SoftwareSerial.h> // For serial reading
#include <SPI.h> // SPI protocol (for the MiCS-2714)
#include <FileIO.h> // For SD writing
#include <Bridge.h>
#include <Process.h> // For time stamping
#include "GoogleAccount.h" // Google account information
#include <HttpClient.h> // For direct data logging on Google Spreasheets
The sketch exceeds the maximum allowed length tp publish, you'll find it attached.
Best,
Jean-François B.
MesureCO2.ino (16 KB)