Skip to content

Commit

Permalink
first led is in left bottom corner
Browse files Browse the repository at this point in the history
  • Loading branch information
techniccontroller committed Nov 17, 2023
1 parent 77b2306 commit 68b37d2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Wordclock 2.0

> **_NOTE:_** This developmentbranch (*dev_lars*) implements requested changes by Lars: first led is on bottom left corner, minutes indicators are at the end of led strip (top of clock).
Wordclock 2.0 with ESP8266 and NTP time

More details on my website: https://techniccontroller.com/word-clock-with-wifi-and-neopixel/
Expand Down
4 changes: 2 additions & 2 deletions ledmatrix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ void LEDMatrix::drawOnMatrix(float factor){
for(int z = 0; z < HEIGHT; z++){
// inplement momentum as smooth transistion function
uint32_t filteredColor = interpolateColor24bit(currentgrid[z][s], targetgrid[z][s], factor);
(*neomatrix).drawPixel(s, z, color24to16bit(filteredColor));
(*neomatrix).drawPixel(s, z+1, color24to16bit(filteredColor));
currentgrid[z][s] = filteredColor;
totalCurrent += calcEstimatedLEDCurrent(filteredColor);
}
Expand All @@ -200,7 +200,7 @@ void LEDMatrix::drawOnMatrix(float factor){
// loop over all minute indicator leds
for(int i = 0; i < 4; i++){
uint32_t filteredColor = interpolateColor24bit(currentindicators[i], targetindicators[i], factor);
(*neomatrix).drawPixel(WIDTH - (1+i), HEIGHT, color24to16bit(filteredColor));
(*neomatrix).drawPixel(WIDTH - (1+i), 0, color24to16bit(filteredColor));
currentindicators[i] = filteredColor;
totalCurrent += calcEstimatedLEDCurrent(filteredColor);
}
Expand Down
2 changes: 1 addition & 1 deletion wordclock_esp8266.ino
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ WiFiManager wifiManager;
// Note that for older NeoPixel strips you might need to change the third parameter--see the strandtest
// example for more information on possible values.
Adafruit_NeoMatrix matrix = Adafruit_NeoMatrix(WIDTH, HEIGHT+1, NEOPIXELPIN,
NEO_MATRIX_TOP + NEO_MATRIX_LEFT +
NEO_MATRIX_BOTTOM + NEO_MATRIX_LEFT +
NEO_MATRIX_ROWS + NEO_MATRIX_ZIGZAG,
NEO_GRB + NEO_KHZ800);

Expand Down

0 comments on commit 68b37d2

Please sign in to comment.