Skip to content

Commit

Permalink
Display Handler and Sunrise library added, platform ini updated
Browse files Browse the repository at this point in the history
  • Loading branch information
barakuda21 committed Feb 13, 2023
1 parent 0a6f789 commit ad0fab1
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/DisplayHandler.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Function to setup the display

void setup_display();
18 changes: 18 additions & 0 deletions lib/sunrise.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@


// Function to setup the time client
void setuptimeClient ();


// setPVstartflag is a function that calculates start and end of the PV production
// based on sunrise and sunset and a lag factor
// the lag factor has to be determined by calculating the time from theoretical sunrise to first PV production

//Variables:
//float lagmorning=1.5;// time in decimal hours between real sunset and start of PV
// float lagevening=2; // time in decimal hours between end of PV power production and real sunset

// This function figures out wethere PV can produce power or not
// flag pvstartflag is true at daytime when pv can procuce power and false when PV can not produce power
bool setPVstartflag(float lagmorning, float lagevening);

8 changes: 8 additions & 0 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ lib_deps =
;https://github.com/marvinroger/async-mqtt-client
https://github.com/me-no-dev/AsyncTCP

https://github.com/adafruit/Adafruit_BusIO ; Uli added due to update of GFX Library (Display)
https://github.com/adafruit/Adafruit-GFX-Library.git ; Uli Displaydriver
https://github.com/adafruit/Adafruit_SSD1306.git ; Uli Displaydriver
https://github.com/arduino-libraries/NTPClient ; Uli 21.01. NTP Time client for Sunrise and sunset calculation




lib_ignore =
; ESP Async WebServer ; force the use of the esphome version
; AsyncTCP ; force the use of the esphome version
Expand Down

0 comments on commit ad0fab1

Please sign in to comment.