firmware wip , add eeprom table in comments

This commit is contained in:
Marcus 2024-04-28 22:59:26 +02:00
parent df102d8a43
commit ace7c8b678

View file

@ -110,6 +110,7 @@ bool UseFan;
// In case the user uses no 12V LED on the LED output and an relais instead
// we have to disable PWM. So we ask here for what kind of light user is going
bool UseLEDrelais;
bool UseFANrelais;
// Which temperature sensor to use?
byte TemperatureSensor_Type;
@ -140,7 +141,7 @@ byte SunriseMinute = 0;
// PINled_PWM - contains the PWM value for dimming the grow light
// default is 255 to ensure it is just on for the case UseLEDrelais is true
byte PINled_PWM = 255;
byte PINfan_PWM = 255;
/*
*
@ -367,14 +368,14 @@ function convertDateToEpoch(src, dst) {
*/
// D0 is HIGH at boot, no PWM
const uint8_t PINfan = D0;
const uint8_t PINpump = D0;
// If D3 is pulled to LOW, boot fails
const uint8_t PINdht = D3;
// D4 is HIGH at boot, boot fail if pulled to LOW
// During Start Screen you can pull D4 to LOW to wipe saved data in EEPROM
// DO NOT PULL D4 DOWN AT WHEN POWERING ON !!! BOOT WILL FAIL
const uint8_t PIN_WIPE = D4;
const uint8_t PINpump = D5;
const uint8_t PINfan = D5;
const uint8_t PINled = D6; //
const uint8_t PINwaterlevel = D7;
const uint8_t PINsoilmoisture = D8;
@ -674,6 +675,43 @@ void wipeEEPROM() {
bool loadEEPROM() {
/*
* EEPROM Save table
*
* 0 WIFIssid
* 32 WIFIpassword
* 96 WIFIip
* 112 WIFInetmask
* 128 WIFIgateway
* 144 WIFIdns
* 160 WIFIuseDHCP
*
* 161 configured
* 162 UseFan
* 163 UsePump
* 164 PumpOnTime
* 165 MoistureSensor_Type
* 166 SoilmoistureLow
* 167 ntpOffset
* 169 UseLEDrelais
*
* 170 GrowName
* 202 GrowStart
* 206 DaysVeg
* 207 DaysBloom
* 208 LighthoursVet
* 209 LighthoursBloom
* 210 SunriseHour
* 211 SunriseMinute
* 212 DayOfGrow
*
* -- afterwards added, need to sort --
*
* 213 UseLEDrelais
* 214 TemperatureSensor_Type
*
*/
Serial.println(":: loading EEPROM ::");
display.setCursor(0,36);
@ -1949,8 +1987,19 @@ void APIgetSensors() {
/*
*
* TODO LIST / NOTES
*
*
* - Sunrise and Sunset PWM if PWM is set
* - PWM for fan control
* - avoid using javascript to set the GrowName in the Menu and the time
* as well
* -
*
*
*/