Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
e72de27
added pairing screen
zanemcmorris Mar 10, 2024
78e2f63
fuck you
zanemcmorris Mar 10, 2024
c761e8b
Merge branch 'main' of https://github.com/zanemcmorris/Home_Air_Quali…
zanemcmorris Mar 10, 2024
c87323d
Working code
PhoenixBloomfield Mar 12, 2024
e54e76f
Minor fixes
zanemcmorris Mar 13, 2024
9691e0e
minor fixes
zanemcmorris Mar 13, 2024
b3b7f8e
working code
zanemcmorris Mar 15, 2024
88b15ef
updating...
zanemcmorris Mar 21, 2024
0e8e9d4
Improved screen functionality
PhoenixBloomfield Mar 26, 2024
0f86418
set code configuration for custom PCB rather than breadboard
PhoenixBloomfield Mar 26, 2024
27473c9
minor updates
zanemcmorris Mar 30, 2024
334b3cb
Added sen55 cable drawing in PCB folder, added debugging options in s…
PhoenixBloomfield Apr 2, 2024
1b1a66e
Adding basic button functionality and minor bug fixes
zanemcmorris Apr 5, 2024
aba9f9c
Finalizing merge
zanemcmorris Apr 5, 2024
de64cca
Factory reset nearly complete
zanemcmorris Apr 6, 2024
2449ea5
Updated icons
PhoenixBloomfield Apr 16, 2024
9778486
Fixed bug from previous commit related to 4 digits
PhoenixBloomfield Apr 16, 2024
ee6421c
Adding lots
zanemcmorris Apr 17, 2024
0164937
Epaper updates
PhoenixBloomfield Apr 18, 2024
5833e6d
Merge branch 'main' of https://github.com/zanemcmorris/Home_Air_Quali…
zanemcmorris Apr 20, 2024
30f7a8a
Adding lots more functionality
zanemcmorris Apr 20, 2024
bff7d76
Epaper icon updates. Some final polishing and testing still needed. D…
PhoenixBloomfield Apr 21, 2024
94229ba
Merge complete
zanemcmorris Apr 21, 2024
dda354e
Nearly final
zanemcmorris Apr 21, 2024
1c0d293
fixed unit bug
PhoenixBloomfield Apr 23, 2024
fda0895
Added custom name to EPD
zanemcmorris Apr 25, 2024
375c150
Added last code needed to rotate screen
PhoenixBloomfield Apr 26, 2024
9b988d1
Fixed small bug
PhoenixBloomfield Apr 26, 2024
c62b18b
updated pairing screen bitmap
PhoenixBloomfield Apr 26, 2024
0fc4abf
Near final code
zanemcmorris May 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/home/backup/HomeAir/backup4-4-25.zip
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"cmake.configureOnOpen": false
"cmake.configureOnOpen": false,
"idf.portWin": "COM14"
}
27 changes: 24 additions & 3 deletions Firmware/FSBrowser/FSBrowser.ino
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,19 @@
#include <SPIFFS.h>
#endif

#define CAPSTONE_LAB
// #define ZANE_HOUSE


#ifdef CAPSTONE_LAB
const char* ssid = "CapstoneWifi";
const char* password = "RuleNumber9";
#endif

#ifdef ZANE_HOUSE
const char* ssid = "NastyWiFi";
const char* password = "PurplePanda420";
#endif
const char* host = "esp32fs";
WebServer server(80);
//holds the current upload
Expand Down Expand Up @@ -224,18 +235,28 @@ void setup(void) {
DBG_OUTPUT_PORT.begin(115200);
DBG_OUTPUT_PORT.print("\n");
DBG_OUTPUT_PORT.setDebugOutput(true);
delay(1000);

FILESYSTEM.begin();
SPIFFS.begin(false);
Serial.println("Opening spiffs.");
File root = FILESYSTEM.open("/");
File root = SPIFFS.open("/");
File file = root.openNextFile();
if(!root){
Serial.println("Unable to mount spiffs");
}
while (file) {
String fileName = file.name();
size_t fileSize = file.size();
DBG_OUTPUT_PORT.printf("FS File: %s, size: %s\n", fileName.c_str(), formatBytes(fileSize).c_str());
file = root.openNextFile();
}
DBG_OUTPUT_PORT.printf("\n");
// DBG_OUTPUT_PORT.printf("\n");
// Serial.println("Deleting datalog.txt");
// FILESYSTEM.remove("/datalog.txt");
// FILESYSTEM.remove("/dest_bin");
// Serial.println("deleted");
delay(3000);




Expand Down
2 changes: 0 additions & 2 deletions Firmware/FirmwareREADME.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,3 @@ The firmware will upload 11 datapoints to the application. They are stored in th
10: AQI - Computed onboard using PPM 2.5 and other values

Data size calculations can be found on this spreadsheet: https://docs.google.com/spreadsheets/d/1_EFeLgpe8HF9_ko5QajpB0fkfWvWioJkB7S2AnPqzwQ/edit?usp=sharing


40 changes: 24 additions & 16 deletions Firmware/HomeAir/AQI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ uint16_t getPPM25AQI(float ppm25) {
breakpointHigh = 500;
breakpointLow = 350.5;
}
return (((indexHigh - indexLow) / (breakpointHigh - breakpointLow)) * (ppm25 - breakpointLow) + indexLow);
return (((indexHigh - indexLow) / (breakpointHigh - breakpointLow)) *
(ppm25 - breakpointLow) +
indexLow);
}

uint16_t getPPM10AQI(float ppm10) {
Expand Down Expand Up @@ -99,15 +101,17 @@ uint16_t getPPM10AQI(float ppm10) {
breakpointHigh = 604;
breakpointLow = 505;
}
return (((indexHigh - indexLow) / (breakpointHigh - breakpointLow)) * (ppm10 - breakpointLow) + indexLow);
return (((indexHigh - indexLow) / (breakpointHigh - breakpointLow)) *
(ppm10 - breakpointLow) +
indexLow);
}

uint16_t getCOAQI(float CO) {

float indexHigh, indexLow;
float breakpointHigh, breakpointLow;

if (CO > 0 && CO < 4.4) {
if (CO >= 0 && CO < 4.4) {
indexHigh = 50;
indexLow = 0;
breakpointHigh = 4.4;
Expand Down Expand Up @@ -143,22 +147,26 @@ uint16_t getCOAQI(float CO) {
breakpointHigh = 50.4;
breakpointLow = 40.5;
}
return (((indexHigh - indexLow) / (breakpointHigh - breakpointLow)) * (CO - breakpointLow) + indexLow);
return (((indexHigh - indexLow) / (breakpointHigh - breakpointLow)) *
(CO - breakpointLow) +
indexLow);
}

float aqiGetCompositeAQI(float ppm25, float ppm10, float CO) {
float AQI25 = getPPM25AQI(ppm25);
float AQI10 = getPPM10AQI(ppm10);
float AQICO = getCOAQI(CO);

if (AQI25 > AQI10 && AQI25 > AQICO) {
// Serial.println("AQI Source: PPM 2.5");
return AQI25;
} else if (AQI10 > AQI25 && AQI10 > AQICO) {
// Serial.println("AQI Source: PPM 10.0");
return AQI10;
} else {
// Serial.println("AQI Source: CO");
return AQICO;
}
// float AQICO = getCOAQI(CO);

return (AQI25 >= AQI10) ? AQI25 : AQI10;

// if (AQI25 > AQI10 && AQI25 > AQICO) {
// // Serial.println("AQI Source: PPM 2.5");
// return AQI25;
// } else if (AQI10 > AQI25 && AQI10 > AQICO) {
// // Serial.println("AQI Source: PPM 10.0");
// return AQI10;
// } else {
// // Serial.println("AQI Source: CO");
// return AQICO;
// }
}
Loading