Hello - I am using a Heltec ESP32 OLED wifi/lora/ble V3 for a public menorah display. The device simply logs in to my wifi (at home) to get the date and time, and then, comparing the current date to the list of Hanukkah dates, lights up the appropriate candles/LEDs. It works fine at home - connects to my wifi and all is well. But my display will be downtown. There is a public wifi, but I am told that there is a "terms/agreement" page that pops up for people's phones and computers. As you can see from my code, I don't have a way to make the Heltec "agree" and proceed. My next thought was to try connecting the Heltec to the internet via my iPhone's hotspot. I have tried entering my hotspot name and password, but the Heltec can't seem to get in. I would love some guidance on how to make this happen. Entire code is below. Thank you in advance!
//*******************************************************************
//*******************************************************************
//
// Upon startup, the program will connect to the local
// wifi to obtain the current time and date, then
// disconnect. It will compare the date with the stored
// Hanukkah dates for all years from 2023 to 2038, then
// light the appropriate candles for the particular day
// of Hanukkah.
//
// The display automatically turns off after a few seconds.
// Pressing the yellow button turns the display on and
// turns the Menorah's LED's on one at a time.
//*******************************************************************
//*******************************************************************
#include <WiFi.h>
#include "time.h"
#include "heltec.h"
int testSw = 48; // TEST SWITCH
int cdl1 = 47; // - RIGHT-MOST CANDLE
int cdl2 = 33; //
int cdl3 = 34; //
int cdl4 = 38; //
int cdl5 = 39; // - SHAMASH CANDLE
int cdl6 = 45; //
int cdl7 = 42; //
int cdl8 = 41; //
int cdl9 = 40; // - LEFT-MOST CANDLE
int testState = 0;
int error = 0;
// Replace with your network credentials
const char* ssid = "*****************"; // wifi network name
const char* password = "**************"; // password
// Define NTP Client to get time
const char* ntpServer = "north-america.pool.ntp.org";
const long gmtOffset_sec = -36000;
const int daylightOffset_sec = 3600 + 3600 + 3600;
unsigned long previousMillis = 0;
int displayOff = 0;
void setup()
{
pinMode(testSw, INPUT_PULLUP);
pinMode(cdl1, OUTPUT);
pinMode(cdl2, OUTPUT);
pinMode(cdl3, OUTPUT);
pinMode(cdl4, OUTPUT);
pinMode(cdl5, OUTPUT);
pinMode(cdl6, OUTPUT);
pinMode(cdl7, OUTPUT);
pinMode(cdl8, OUTPUT);
pinMode(cdl9, OUTPUT);
//anything that starts with HELTEC is related to the display
Heltec.begin(true /*DisplayEnable Enable*/, false /*LoRa Enable*/, true /*Serial Enable*/);
Heltec.display->setContrast(255);
Heltec.display->setTextAlignment(TEXT_ALIGN_CENTER);
Heltec.display->setFont(ArialMT_Plain_10);
Heltec.display->setFont(ArialMT_Plain_16);
Heltec.display->drawString(64, 20, "Connecting to ");
Heltec.display->drawString(64, 40, ssid);
Heltec.display->display();
delay(10);
WiFi.begin(ssid, password);
delay(10);
while (WiFi.status() != WL_CONNECTED) { delay(500); }
// Print local IP address and start web server
Heltec.display->clear();
Heltec.display->drawString(64, 15, "WiFi connected.");
Heltec.display->drawString(64, 30, "IP address: ");
Heltec.display->drawString(64, 45, WiFi.localIP().toString());
// Serial.println(WiFi.localIP());
Heltec.display->display();
delay(1000);
Heltec.display->clear();
// Initialize a NTPClient to get time
configTime(gmtOffset_sec, daylightOffset_sec, ntpServer);
printLocalTime();
WiFi.disconnect(); //end Wifi connection
Heltec.display->clear();
Heltec.display->setFont(ArialMT_Plain_10);
Heltec.display->drawString(64, 0, "Menorah");
Heltec.display->drawString(64, 15, "Programmed for 2023-38");
delay(6000);
Heltec.display->clear();
Heltec.display->display();
Heltec.display->setFont(ArialMT_Plain_10);
Heltec.display->drawString(64, 0, "Press and HOLD the");
Heltec.display->drawString(64, 18, "** YELLOW BUTTON **");
Heltec.display->drawString(64, 36, "to light the candles");
Heltec.display->drawString(64, 49, "one at a time");
Heltec.display->display();
delay(5000);
Heltec.display->clear();
Heltec.display->display();
}
void loop()
{
unsigned long currentMillis = millis();
Heltec.display->clear();
if (error == 1)
{
displayOff = 0;
}
else if (currentMillis - previousMillis >= 30000) // if 30s has passed with no press of the "test button", turn off the display
{
displayOff = 1;
Heltec.display->clear();
Heltec.display->display();
} else displayOff = 0;
printLocalTime();
candleTest();
}
void printLocalTime()
{
struct tm timeinfo;
if (!getLocalTime(&timeinfo))
{
displayOff = 0;
Heltec.display->clear();
// Serial.println("Failed to obtain time");
Heltec.display->setFont(ArialMT_Plain_10);
Heltec.display->drawString(64, 0, "FAILED TO");
Heltec.display->drawString(64, 15, "OBTAIN TIME");
Heltec.display->drawString(64, 30, "PLEASE");
Heltec.display->drawString(64, 45, "CYCLE POWER");
Heltec.display->display();
error = 1;
return;
}
//this routine makes the strings for the digital display
// Serial.println(&timeinfo, "%a %b %d, %Y %H:%M:%S");
char hnkhDateStringBuff[10];
char timeStringBuff[50]; //50 chars should be enough
char dateStringBuff[50]; //50 chars should be enough
char secStringBuff[3];
char minStringBuff[3];
char hourStringBuff[3];
strftime(hnkhDateStringBuff, sizeof(hnkhDateStringBuff), "%x", &timeinfo);
strftime(timeStringBuff, sizeof(timeStringBuff), "%I:%M:%S %p", &timeinfo);
strftime(dateStringBuff, sizeof(dateStringBuff), "%a %b %d, %Y", &timeinfo);
strftime(secStringBuff, sizeof(secStringBuff), "%S", &timeinfo);
strftime(minStringBuff, sizeof(minStringBuff), "%M", &timeinfo);
strftime(hourStringBuff, sizeof(hourStringBuff), "%H", &timeinfo);
// This creates the analog clock angles for the hands
String hnkhDateAsString(hnkhDateStringBuff);
String TimeAsString(timeStringBuff);
String DateAsString(dateStringBuff);
String SecAsString(secStringBuff);
if (displayOff == 0)
{
Heltec.display->setFont(ArialMT_Plain_10);
Heltec.display->drawString(64, 0, "Seattle Armory Menorah");
Heltec.display->drawString(64, 12, TimeAsString);
Heltec.display->setFont(ArialMT_Plain_16);
Heltec.display->drawString(64, 26, DateAsString);
Heltec.display->setFont(ArialMT_Plain_10);
Heltec.display->display();
}
// HANUKKAH DAY ONE
// Format MUST include leading 0's. 2023 HANUKKAH STARTS ON 12/7
if (hnkhDateAsString == "12/07/23" || hnkhDateAsString == "12/25/24" || hnkhDateAsString == "12/14/25" || hnkhDateAsString == "12/04/26" || hnkhDateAsString == "12/24/27" || hnkhDateAsString == "12/12/28" || hnkhDateAsString == "12/01/29" || hnkhDateAsString == "12/20/30" || hnkhDateAsString == "12/09/31" || hnkhDateAsString == "12/27/32" || hnkhDateAsString == "12/16/33" || hnkhDateAsString == "12/06/34" || hnkhDateAsString == "12/25/35" || hnkhDateAsString == "12/13/36" || hnkhDateAsString == "12/02/37" || hnkhDateAsString == "12/21/38")
{
if (timeinfo.tm_hour >= 17 && timeinfo.tm_hour < 23) // SET THIS FOR 5P(17)
{
if (displayOff == 0)
{
Heltec.display->drawString(64, 50, "Hanukkah Day ONE");
Heltec.display->display();
}
// Light appropriate candles
digitalWrite(cdl5, HIGH);
delay(2000);
digitalWrite(cdl9, HIGH);
}
if (timeinfo.tm_hour == 23) // SET THIS FOR 11PM (23)
{
// Extinguish all candles
digitalWrite(cdl9, LOW);
digitalWrite(cdl8, LOW);
digitalWrite(cdl7, LOW);
digitalWrite(cdl6, LOW);
digitalWrite(cdl5, LOW);
digitalWrite(cdl4, LOW);
digitalWrite(cdl3, LOW);
digitalWrite(cdl2, LOW);
digitalWrite(cdl1, LOW);
}
}
// HANUKKAH DAY TWO
// Format MUST include leading 0's
if (hnkhDateAsString == "12/08/23" || hnkhDateAsString == "12/26/24" || hnkhDateAsString == "12/15/25" || hnkhDateAsString == "12/05/26" || hnkhDateAsString == "12/25/27" || hnkhDateAsString == "12/13/28" || hnkhDateAsString == "12/02/29" || hnkhDateAsString == "12/21/30" || hnkhDateAsString == "12/10/31" || hnkhDateAsString == "12/28/32" || hnkhDateAsString == "12/17/33" || hnkhDateAsString == "12/07/34" || hnkhDateAsString == "12/26/35" || hnkhDateAsString == "12/14/36" || hnkhDateAsString == "12/03/37" || hnkhDateAsString == "12/22/38")
{
if (timeinfo.tm_hour >= 17 && timeinfo.tm_hour < 23) // SET THIS FOR 5P(17)
{
if (displayOff == 0)
{
Heltec.display->drawString(64, 50, "Hanukkah Day TWO");
Heltec.display->display();
}
// Light appropriate candles
digitalWrite(cdl5, HIGH);
delay(2000);
digitalWrite(cdl8, HIGH);
delay(2000);
digitalWrite(cdl9, HIGH);
}
if (timeinfo.tm_hour == 23) // SET THIS FOR 11PM (23)
{
// Extinguish all candles
digitalWrite(cdl9, LOW);
digitalWrite(cdl8, LOW);
digitalWrite(cdl7, LOW);
digitalWrite(cdl6, LOW);
digitalWrite(cdl5, LOW);
digitalWrite(cdl4, LOW);
digitalWrite(cdl3, LOW);
digitalWrite(cdl2, LOW);
digitalWrite(cdl1, LOW);
}
}
// HANUKKAH DAY THREE
// Format MUST include leading 0's
if (hnkhDateAsString == "12/09/23" || hnkhDateAsString == "12/27/24" || hnkhDateAsString == "12/16/25" || hnkhDateAsString == "12/06/26" || hnkhDateAsString == "12/26/27" || hnkhDateAsString == "12/14/28" || hnkhDateAsString == "12/03/29" || hnkhDateAsString == "12/22/30" || hnkhDateAsString == "12/11/31" || hnkhDateAsString == "12/29/32" || hnkhDateAsString == "12/18/33" || hnkhDateAsString == "12/08/34" || hnkhDateAsString == "12/27/35" || hnkhDateAsString == "12/15/36" || hnkhDateAsString == "12/04/37" || hnkhDateAsString == "12/23/38")
{
if (timeinfo.tm_hour >= 17 && timeinfo.tm_hour < 23) // SET THIS FOR 5P(17)
{
if (displayOff == 0)
{
Heltec.display->drawString(64, 50, "Hanukkah Day THREE");
Heltec.display->display();
}
// Light appropriate candles
digitalWrite(cdl5, HIGH);
delay(2000);
digitalWrite(cdl7, HIGH);
delay(2000);
digitalWrite(cdl8, HIGH);
delay(2000);
digitalWrite(cdl9, HIGH);
}
if (timeinfo.tm_hour == 23) // SET THIS FOR 11PM (23)
{
// Extinguish all candles
digitalWrite(cdl9, LOW);
digitalWrite(cdl8, LOW);
digitalWrite(cdl7, LOW);
digitalWrite(cdl6, LOW);
digitalWrite(cdl5, LOW);
digitalWrite(cdl4, LOW);
digitalWrite(cdl3, LOW);
digitalWrite(cdl2, LOW);
digitalWrite(cdl1, LOW);
}
}
// HANUKKAH DAY FOUR
// Format MUST include leading 0's
if (hnkhDateAsString == "12/10/23" || hnkhDateAsString == "12/28/24" || hnkhDateAsString == "12/17/25" || hnkhDateAsString == "12/07/26" || hnkhDateAsString == "12/27/27" || hnkhDateAsString == "12/15/28" || hnkhDateAsString == "12/04/29" || hnkhDateAsString == "12/23/30" || hnkhDateAsString == "12/12/31" || hnkhDateAsString == "12/30/32" || hnkhDateAsString == "12/19/33" || hnkhDateAsString == "12/09/34" || hnkhDateAsString == "12/28/35" || hnkhDateAsString == "12/16/36" || hnkhDateAsString == "12/05/37" || hnkhDateAsString == "12/24/38")
{
if (timeinfo.tm_hour >= 17 && timeinfo.tm_hour < 23) // SET THIS FOR 5P(17)
{
if (displayOff == 0)
{
Heltec.display->drawString(64, 50, "Hanukkah Day FOUR");
Heltec.display->display();
}
// Light appropriate candles
digitalWrite(cdl5, HIGH);
delay(2000);
digitalWrite(cdl6, HIGH);
delay(2000);
digitalWrite(cdl7, HIGH);
delay(2000);
digitalWrite(cdl8, HIGH);
delay(2000);
digitalWrite(cdl9, HIGH);
}
if (timeinfo.tm_hour == 23) // SET THIS FOR 11PM (23)
{
// Extinguish all candles
digitalWrite(cdl9, LOW);
digitalWrite(cdl8, LOW);
digitalWrite(cdl7, LOW);
digitalWrite(cdl6, LOW);
digitalWrite(cdl5, LOW);
digitalWrite(cdl4, LOW);
digitalWrite(cdl3, LOW);
digitalWrite(cdl2, LOW);
digitalWrite(cdl1, LOW);
}
}
// HANUKKAH DAY FIVE
// Format MUST include leading 0's
if (hnkhDateAsString == "12/11/23" || hnkhDateAsString == "12/29/24" || hnkhDateAsString == "12/18/25" || hnkhDateAsString == "12/08/26" || hnkhDateAsString == "12/28/27" || hnkhDateAsString == "12/16/28" || hnkhDateAsString == "12/05/29" || hnkhDateAsString == "12/24/30" || hnkhDateAsString == "12/13/31" || hnkhDateAsString == "12/31/32" || hnkhDateAsString == "12/20/33" || hnkhDateAsString == "12/10/34" || hnkhDateAsString == "12/29/35" || hnkhDateAsString == "12/17/36" || hnkhDateAsString == "12/06/37" || hnkhDateAsString == "12/25/38")
{
if (timeinfo.tm_hour >= 17 && timeinfo.tm_hour < 23) // SET THIS FOR 5P(17)
{
if (displayOff == 0)
{
Heltec.display->drawString(64, 50, "Hanukkah Day FIVE");
Heltec.display->display();
}
// Light appropriate candles
digitalWrite(cdl5, HIGH);
delay(2000);
digitalWrite(cdl4, HIGH);
delay(2000);
digitalWrite(cdl6, HIGH);
delay(2000);
digitalWrite(cdl7, HIGH);
delay(2000);
digitalWrite(cdl8, HIGH);
delay(2000);
digitalWrite(cdl9, HIGH);
}
if (timeinfo.tm_hour == 23) // SET THIS FOR 11PM (23)
{
// Extinguish all candles
digitalWrite(cdl9, LOW);
digitalWrite(cdl8, LOW);
digitalWrite(cdl7, LOW);
digitalWrite(cdl6, LOW);
digitalWrite(cdl5, LOW);
digitalWrite(cdl4, LOW);
digitalWrite(cdl3, LOW);
digitalWrite(cdl2, LOW);
digitalWrite(cdl1, LOW);
}
}
// HANUKKAH DAY SIX
// Format MUST include leading 0's
if (hnkhDateAsString == "12/12/23" || hnkhDateAsString == "12/30/24" || hnkhDateAsString == "12/19/25" || hnkhDateAsString == "12/09/26" || hnkhDateAsString == "12/29/27" || hnkhDateAsString == "12/17/28" || hnkhDateAsString == "12/06/29" || hnkhDateAsString == "12/25/30" || hnkhDateAsString == "12/14/31" || hnkhDateAsString == "01/01/33" || hnkhDateAsString == "12/22/33" || hnkhDateAsString == "12/11/34" || hnkhDateAsString == "12/31/35" || hnkhDateAsString == "12/18/36" || hnkhDateAsString == "12/08/37" || hnkhDateAsString == "12/26/38")
{
if (timeinfo.tm_hour >= 17 && timeinfo.tm_hour < 23) // SET THIS FOR 5P(17)
{
if (displayOff == 0)
{
Heltec.display->drawString(64, 50, "Hanukkah Day SIX");
Heltec.display->display();
}
// Light appropriate candles
digitalWrite(cdl5, HIGH);
delay(2000);
digitalWrite(cdl3, HIGH);
delay(2000);
digitalWrite(cdl4, HIGH);
delay(2000);
digitalWrite(cdl6, HIGH);
delay(2000);
digitalWrite(cdl7, HIGH);
delay(2000);
digitalWrite(cdl8, HIGH);
delay(2000);
digitalWrite(cdl9, HIGH);
}
if (timeinfo.tm_hour == 23) // SET THIS FOR 11PM (23)
{
// Extinguish all candles
digitalWrite(cdl9, LOW);
digitalWrite(cdl8, LOW);
digitalWrite(cdl7, LOW);
digitalWrite(cdl6, LOW);
digitalWrite(cdl5, LOW);
digitalWrite(cdl4, LOW);
digitalWrite(cdl3, LOW);
digitalWrite(cdl2, LOW);
digitalWrite(cdl1, LOW);
}
}
// HANUKKAH DAY SEVEN
// Format MUST include leading 0's
if (hnkhDateAsString == "12/13/23" || hnkhDateAsString == "12/31/24" || hnkhDateAsString == "12/20/25" || hnkhDateAsString == "12/10/26" || hnkhDateAsString == "12/30/27" || hnkhDateAsString == "12/18/28" || hnkhDateAsString == "12/07/29" || hnkhDateAsString == "12/26/30" || hnkhDateAsString == "12/15/31" || hnkhDateAsString == "01/02/33" || hnkhDateAsString == "12/23/33" || hnkhDateAsString == "12/12/34" || hnkhDateAsString == "01/01/36" || hnkhDateAsString == "12/19/36" || hnkhDateAsString == "12/09/37" || hnkhDateAsString == "12/27/38")
{
if (timeinfo.tm_hour >= 17 && timeinfo.tm_hour < 23) // SET THIS FOR 5P(17)
{
if (displayOff == 0)
{
Heltec.display->drawString(64, 50, "Hanukkah Day SEVEN");
Heltec.display->display();
}
// Light appropriate candles
digitalWrite(cdl5, HIGH);
delay(2000);
digitalWrite(cdl2, HIGH);
delay(2000);
digitalWrite(cdl3, HIGH);
delay(2000);
digitalWrite(cdl4, HIGH);
delay(2000);
digitalWrite(cdl6, HIGH);
delay(2000);
digitalWrite(cdl7, HIGH);
delay(2000);
digitalWrite(cdl8, HIGH);
delay(2000);
digitalWrite(cdl9, HIGH);
}
if (timeinfo.tm_hour == 23) // SET THIS FOR 11PM (23)
{
// Extinguish all candles
digitalWrite(cdl9, LOW);
digitalWrite(cdl8, LOW);
digitalWrite(cdl7, LOW);
digitalWrite(cdl6, LOW);
digitalWrite(cdl5, LOW);
digitalWrite(cdl4, LOW);
digitalWrite(cdl3, LOW);
digitalWrite(cdl2, LOW);
digitalWrite(cdl1, LOW);
}
}
// HANUKKAH DAY EIGHT
// Format MUST include leading 0's
if (hnkhDateAsString == "12/14/23" || hnkhDateAsString == "01/01/25" || hnkhDateAsString == "12/21/25" || hnkhDateAsString == "12/11/26" || hnkhDateAsString == "12/31/27" || hnkhDateAsString == "12/19/28" || hnkhDateAsString == "12/08/29" || hnkhDateAsString == "12/27/30" || hnkhDateAsString == "12/16/31" || hnkhDateAsString == "01/03/33" || hnkhDateAsString == "12/24/33" || hnkhDateAsString == "12/13/34" || hnkhDateAsString == "01/02/36" || hnkhDateAsString == "12/20/36" || hnkhDateAsString == "12/10/37" || hnkhDateAsString == "12/28/38")
{
if (timeinfo.tm_hour >= 17 && timeinfo.tm_hour < 23) // SET THIS FOR 5P(17)
{
if (displayOff == 0)
{
Heltec.display->drawString(64, 50, "Hanukkah Day EIGHT");
Heltec.display->display();
}
// Light appropriate candles
digitalWrite(cdl5, HIGH);
delay(2000);
digitalWrite(cdl1, HIGH);
delay(2000);
digitalWrite(cdl2, HIGH);
delay(2000);
digitalWrite(cdl3, HIGH);
delay(2000);
digitalWrite(cdl4, HIGH);
delay(2000);
digitalWrite(cdl6, HIGH);
delay(2000);
digitalWrite(cdl7, HIGH);
delay(2000);
digitalWrite(cdl8, HIGH);
delay(2000);
digitalWrite(cdl9, HIGH);
}
if (timeinfo.tm_hour == 23) // SET THIS FOR 11PM (23)
{
// Extinguish all candles
digitalWrite(cdl9, LOW);
digitalWrite(cdl8, LOW);
digitalWrite(cdl7, LOW);
digitalWrite(cdl6, LOW);
digitalWrite(cdl5, LOW);
digitalWrite(cdl4, LOW);
digitalWrite(cdl3, LOW);
digitalWrite(cdl2, LOW);
digitalWrite(cdl1, LOW);
}
}
// END OF HANUKKAH
// Format MUST include leading 0's
if (hnkhDateAsString == "12/15/23" || hnkhDateAsString == "01/02/25" || hnkhDateAsString == "12/22/25" || hnkhDateAsString == "12/11/26" || hnkhDateAsString == "01/01/27" || hnkhDateAsString == "12/20/28" || hnkhDateAsString == "12/09/29" || hnkhDateAsString == "12/28/30" || hnkhDateAsString == "12/17/31" || hnkhDateAsString == "01/04/33" || hnkhDateAsString == "12/25/33" || hnkhDateAsString == "12/14/34" || hnkhDateAsString == "01/03/36" || hnkhDateAsString == "12/21/36" || hnkhDateAsString == "12/11/37" || hnkhDateAsString == "12/29/38")
{
if (displayOff == 0)
{
Heltec.display->drawString(64, 50, "Hanukkah Is Over");
Heltec.display->display();
}
{
if (timeinfo.tm_hour > 1)
{ // Extinguish all candles
digitalWrite(cdl9, LOW);
digitalWrite(cdl8, LOW);
digitalWrite(cdl7, LOW);
digitalWrite(cdl6, LOW);
digitalWrite(cdl5, LOW);
digitalWrite(cdl4, LOW);
digitalWrite(cdl3, LOW);
digitalWrite(cdl2, LOW);
digitalWrite(cdl1, LOW);
}
}
}
}
//*******************************************************************
void candleTest() {
testState = digitalRead(testSw);
if (testState == LOW) { // Extinguish candles
digitalWrite(cdl1, LOW);
digitalWrite(cdl2, LOW);
digitalWrite(cdl3, LOW);
digitalWrite(cdl4, LOW);
digitalWrite(cdl5, LOW);
digitalWrite(cdl6, LOW);
digitalWrite(cdl7, LOW);
digitalWrite(cdl8, LOW);
digitalWrite(cdl9, LOW);
displayOff = 0;
Heltec.display->clear();
Heltec.display->setFont(ArialMT_Plain_10);
Heltec.display->drawString(64, 0, "LIGHTING CANDLES IN");
Heltec.display->drawRect(20, 48, 6, 16);
Heltec.display->drawRect(30, 48, 6, 16);
Heltec.display->drawRect(40, 48, 6, 16);
Heltec.display->drawRect(50, 48, 6, 16);
Heltec.display->drawRect(60, 38, 6, 16);
Heltec.display->drawRect(70, 48, 6, 16);
Heltec.display->drawRect(80, 48, 6, 16);
Heltec.display->drawRect(90, 48, 6, 16);
Heltec.display->drawRect(100, 48, 6, 16);
Heltec.display->display();
delay(1000);
Heltec.display->setFont(ArialMT_Plain_24);
Heltec.display->drawString(64, 14, "3");
Heltec.display->drawRect(20, 48, 6, 16);
Heltec.display->drawRect(30, 48, 6, 16);
Heltec.display->drawRect(40, 48, 6, 16);
Heltec.display->drawRect(50, 48, 6, 16);
Heltec.display->drawRect(60, 38, 6, 16);
Heltec.display->drawRect(70, 48, 6, 16);
Heltec.display->drawRect(80, 48, 6, 16);
Heltec.display->drawRect(90, 48, 6, 16);
Heltec.display->drawRect(100, 48, 6, 16);
Heltec.display->display();
delay(1000);
Heltec.display->clear();
Heltec.display->setFont(ArialMT_Plain_10);
Heltec.display->drawString(64, 0, "LIGHTING CANDLES IN");
Heltec.display->setFont(ArialMT_Plain_24);
Heltec.display->drawString(64, 14, "2");
Heltec.display->drawRect(20, 48, 6, 16);
Heltec.display->drawRect(30, 48, 6, 16);
Heltec.display->drawRect(40, 48, 6, 16);
Heltec.display->drawRect(50, 48, 6, 16);
Heltec.display->drawRect(60, 38, 6, 16);
Heltec.display->drawRect(70, 48, 6, 16);
Heltec.display->drawRect(80, 48, 6, 16);
Heltec.display->drawRect(90, 48, 6, 16);
Heltec.display->drawRect(100, 48, 6, 16);
Heltec.display->display();
delay(1000);
Heltec.display->clear();
Heltec.display->setFont(ArialMT_Plain_10);
Heltec.display->drawString(64, 0, "LIGHTING CANDLES IN");
Heltec.display->setFont(ArialMT_Plain_24);
Heltec.display->drawString(64, 14, "1");
Heltec.display->drawRect(20, 48, 6, 16);
Heltec.display->drawRect(30, 48, 6, 16);
Heltec.display->drawRect(40, 48, 6, 16);
Heltec.display->drawRect(50, 48, 6, 16);
Heltec.display->drawRect(60, 38, 6, 16);
Heltec.display->drawRect(70, 48, 6, 16);
Heltec.display->drawRect(80, 48, 6, 16);
Heltec.display->drawRect(90, 48, 6, 16);
Heltec.display->drawRect(100, 48, 6, 16);
Heltec.display->display();
delay(1000);
//LIGHT CANDLE FIVE - SHAMASH
Heltec.display->clear();
Heltec.display->drawRect(20, 48, 6, 16);
Heltec.display->drawRect(30, 48, 6, 16);
Heltec.display->drawRect(40, 48, 6, 16);
Heltec.display->drawRect(50, 48, 6, 16);
Heltec.display->fillRect(60, 38, 6, 16);
Heltec.display->drawRect(70, 48, 6, 16);
Heltec.display->drawRect(80, 48, 6, 16);
Heltec.display->drawRect(90, 48, 6, 16);
Heltec.display->drawRect(100, 48, 6, 16);
Heltec.display->drawVerticalLine(62, 32, 2);
Heltec.display->drawVerticalLine(63, 31, 5);
Heltec.display->drawVerticalLine(64, 32, 2);
Heltec.display->display();
digitalWrite(cdl5, HIGH);
delay(1000);
// LIGHT CANDLE ONE
Heltec.display->clear();
digitalWrite(cdl5, LOW);
Heltec.display->fillRect(20, 48, 6, 16);
Heltec.display->drawRect(30, 48, 6, 16);
Heltec.display->drawRect(40, 48, 6, 16);
Heltec.display->drawRect(50, 48, 6, 16);
Heltec.display->drawRect(60, 38, 6, 16);
Heltec.display->drawRect(70, 48, 6, 16);
Heltec.display->drawRect(80, 48, 6, 16);
Heltec.display->drawRect(90, 48, 6, 16);
Heltec.display->drawRect(100, 48, 6, 16);
Heltec.display->drawVerticalLine(22, 42, 2);
Heltec.display->drawVerticalLine(23, 41, 5);
Heltec.display->drawVerticalLine(24, 42, 2);
Heltec.display->display();
digitalWrite(cdl1, HIGH);
delay(1000);
//LIGHT CANDLE TWO
Heltec.display->clear();
digitalWrite(cdl1, LOW);
Heltec.display->drawRect(20, 48, 6, 16);
Heltec.display->fillRect(30, 48, 6, 16);
Heltec.display->drawRect(40, 48, 6, 16);
Heltec.display->drawRect(50, 48, 6, 16);
Heltec.display->drawRect(60, 38, 6, 16);
Heltec.display->drawRect(70, 48, 6, 16);
Heltec.display->drawRect(80, 48, 6, 16);
Heltec.display->drawRect(90, 48, 6, 16);
Heltec.display->drawRect(100, 48, 6, 16);
Heltec.display->drawVerticalLine(32, 42, 2);
Heltec.display->drawVerticalLine(33, 41, 5);
Heltec.display->drawVerticalLine(34, 42, 2);
Heltec.display->display();
digitalWrite(cdl2, HIGH);
delay(1000);
//LIGHT CANDLE THREE
Heltec.display->clear();
digitalWrite(cdl2, LOW);
Heltec.display->drawRect(20, 48, 6, 16);
Heltec.display->drawRect(30, 48, 6, 16);
Heltec.display->fillRect(40, 48, 6, 16);
Heltec.display->drawRect(50, 48, 6, 16);
Heltec.display->drawRect(60, 38, 6, 16);
Heltec.display->drawRect(70, 48, 6, 16);
Heltec.display->drawRect(80, 48, 6, 16);
Heltec.display->drawRect(90, 48, 6, 16);
Heltec.display->drawRect(100, 48, 6, 16);
Heltec.display->drawVerticalLine(42, 42, 2);
Heltec.display->drawVerticalLine(43, 41, 5);
Heltec.display->drawVerticalLine(44, 42, 2);
Heltec.display->display();
digitalWrite(cdl3, HIGH);
delay(1000);
//LIGHT CANDLE FOUR
Heltec.display->clear();
digitalWrite(cdl3, LOW);
Heltec.display->drawRect(20, 48, 6, 16);
Heltec.display->drawRect(30, 48, 6, 16);
Heltec.display->drawRect(40, 48, 6, 16);
Heltec.display->fillRect(50, 48, 6, 16);
Heltec.display->drawRect(60, 38, 6, 16);
Heltec.display->drawRect(70, 48, 6, 16);
Heltec.display->drawRect(80, 48, 6, 16);
Heltec.display->drawRect(90, 48, 6, 16);
Heltec.display->drawRect(100, 48, 6, 16);
Heltec.display->drawVerticalLine(52, 42, 2);
Heltec.display->drawVerticalLine(53, 41, 5);
Heltec.display->drawVerticalLine(54, 42, 2);
Heltec.display->display();
digitalWrite(cdl4, HIGH);
delay(1000);
//LIGHT CANDLE SIX
Heltec.display->clear();
digitalWrite(cdl4, LOW);
Heltec.display->drawRect(20, 48, 6, 16);
Heltec.display->drawRect(30, 48, 6, 16);
Heltec.display->drawRect(40, 48, 6, 16);
Heltec.display->drawRect(50, 48, 6, 16);
Heltec.display->drawRect(60, 38, 6, 16);
Heltec.display->fillRect(70, 48, 6, 16);
Heltec.display->drawRect(80, 48, 6, 16);
Heltec.display->drawRect(90, 48, 6, 16);
Heltec.display->drawRect(100, 48, 6, 16);
Heltec.display->drawVerticalLine(72, 42, 2);
Heltec.display->drawVerticalLine(73, 41, 5);
Heltec.display->drawVerticalLine(74, 42, 2);
Heltec.display->display();
digitalWrite(cdl6, HIGH);
delay(1000);
//LIGHT CANDLE SEVEN
Heltec.display->clear();
digitalWrite(cdl6, LOW);
Heltec.display->drawRect(20, 48, 6, 16);
Heltec.display->drawRect(30, 48, 6, 16);
Heltec.display->drawRect(40, 48, 6, 16);
Heltec.display->drawRect(50, 48, 6, 16);
Heltec.display->drawRect(60, 38, 6, 16);
Heltec.display->drawRect(70, 48, 6, 16);
Heltec.display->fillRect(80, 48, 6, 16);
Heltec.display->drawRect(90, 48, 6, 16);
Heltec.display->drawRect(100, 48, 6, 16);
Heltec.display->drawVerticalLine(82, 42, 2);
Heltec.display->drawVerticalLine(83, 41, 5);
Heltec.display->drawVerticalLine(84, 42, 2);
Heltec.display->display();
digitalWrite(cdl7, HIGH);
delay(1000);
//LIGHT CANDLE EIGHT
Heltec.display->clear();
digitalWrite(cdl7, LOW);
Heltec.display->drawRect(20, 48, 6, 16);
Heltec.display->drawRect(30, 48, 6, 16);
Heltec.display->drawRect(40, 48, 6, 16);
Heltec.display->drawRect(50, 48, 6, 16);
Heltec.display->drawRect(60, 38, 6, 16);
Heltec.display->drawRect(70, 48, 6, 16);
Heltec.display->drawRect(80, 48, 6, 16);
Heltec.display->fillRect(90, 48, 6, 16);
Heltec.display->drawRect(100, 48, 6, 16);
Heltec.display->drawVerticalLine(92, 42, 2);
Heltec.display->drawVerticalLine(93, 41, 5);
Heltec.display->drawVerticalLine(94, 42, 2);
Heltec.display->display();
digitalWrite(cdl8, HIGH);
delay(1000);
//LIGHT CANDLE NINE
Heltec.display->clear();
digitalWrite(cdl8, LOW);
Heltec.display->drawRect(20, 48, 6, 16);
Heltec.display->drawRect(30, 48, 6, 16);
Heltec.display->drawRect(40, 48, 6, 16);
Heltec.display->drawRect(50, 48, 6, 16);
Heltec.display->drawRect(60, 38, 6, 16);
Heltec.display->drawRect(70, 48, 6, 16);
Heltec.display->drawRect(80, 48, 6, 16);
Heltec.display->drawRect(90, 48, 6, 16);
Heltec.display->fillRect(100, 48, 6, 16);
Heltec.display->drawVerticalLine(102, 42, 2);
Heltec.display->drawVerticalLine(103, 41, 5);
Heltec.display->drawVerticalLine(104, 42, 2);
Heltec.display->display();
digitalWrite(cdl9, HIGH);
delay(1000);
// ALL CANDLES OUT
Heltec.display->clear();
digitalWrite(cdl9, LOW);
Heltec.display->drawRect(20, 48, 6, 16);
Heltec.display->drawRect(30, 48, 6, 16);
Heltec.display->drawRect(40, 48, 6, 16);
Heltec.display->drawRect(50, 48, 6, 16);
Heltec.display->drawRect(60, 38, 6, 16);
Heltec.display->drawRect(70, 48, 6, 16);
Heltec.display->drawRect(80, 48, 6, 16);
Heltec.display->drawRect(90, 48, 6, 16);
Heltec.display->drawRect(100, 48, 6, 16);
Heltec.display->display();
delay(1000);
previousMillis = millis();
}
}