-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using ezTime with nodemcu-32s w/64x32 HUb75 LED Matrix #163
Comments
I will need to see more of your code, in order to help. |
Serial monitor doesn't change. Here's whole code: #include <Wire.h> //Configuration //bool secondChanged(); #define myTZ_POSIX TZ= EST -5 EDT ,M3 .5 .0 /2 ,m10 .5 .0 /3 //bool enableHeater = false; //Adafruit_SHT31 sht31 = Adafruit_SHT31(); char ssid[] = "PZRG4"; //float Ct = sht31.readTemperature(); MatrixPanel_I2S_DMA *dma_display = nullptr; Timezone myTZ; uint16_t myBLACK = dma_display->color565(0, 0, 0); const int defaultBrightness = (40*255)/100; // full (100%) brightness int16_t xOne, yOne; void displaySetup() { HUB75_I2S_CFG mxconfig( // If you are using a 64x64 matrix you need to pass a value for the E pin // May or may not be needed depending on your matrix // Some matrix panels use different ICs for driving them and some of them have strange quirks. dma_display = new MatrixPanel_I2S_DMA(mxconfig); void setup() { Serial.begin(115200); WiFi.begin("PZRG4", "erica610"); /*
waitForSync(); while (WiFi.status() != WL_CONNECTED) { Serial.print("Attempting to connect to Network named: "); Serial.println(""); /* // Set NTP polling interval to 60 seconds. Way too often, but good for demonstration purposes. // Make ezTime show us what it is doing myTZ.setLocation(F("America/New_York")); displaySetup(); dma_display->clearScreen(); dma_display->setTextSize(1); // size == 8 pixels high // Pointers to this variable will be passed into getTextBounds, dma_display->getTextBounds("1234567890", 0, 0, &xOne, &yOne, &w, &h); dma_display->getTextBounds("72F 50%", 0, 0, &xOne, &yOne, &w, &h); /* dma_display->getTextBounds("11:15:11am", 0, 0, &xOne, &yOne, &w, &h); //dma_display->fillScreen(myBLACK); //delay(1000); } void loop() { void events();{ if (secondChanged()) { dma_display->getTextBounds("11:15:11am", 0, 0, &xOne, &yOne, &w, &h); |
Serial monitor doesn't change. |
@heffnerm2 , your void event function is inside the void loop, you can't create a function inside another function Also, there are some errors in the void loop. Did this code compile? |
I cleaned it up, yes it does compile and run. I get the displays i expected Temp and Humidity inside and outside and time/date, but it does not update time/date [Centered Text 1_3_23.txt] (https://github.com/ropg/ezTime/files/10339308/Centered.Text.1_3_23.txt) |
I've got it able to display time dma_display->print(myTZ.dateTime("m-j-y")); , however i cannot get it to update the string in real time. I tried
if (secondChanged()) {
dma_display->print(myTZ.dateTime("m-j-y"));
}
and it overwrites the initial display ever second without erasing the original.
How can i get it to "replace' the original digits with the new ones?
Thanks
The text was updated successfully, but these errors were encountered: