freetronics / DMD2

Beta release of a new Dot Matrix Display Arduino library
http://forum.freetronics.com/viewtopic.php?f=26&t=5893
GNU General Public License v3.0
80 stars 71 forks source link

ESP8266 flip bit #29

Open CTWF opened 6 years ago

CTWF commented 6 years ago

Hi. i need mod dmd2 esp8266 support flipbit to make wiring between row panel more simple

luiz76 commented 4 years ago

Yes! Its so much easier to wiring like this: dmd-4x3

Karo95 commented 4 years ago

flipping panels open the DMDFrame.cpp file and search void DMDFrame::setPixel(unsigned int x, unsigned int y, DMDGraphicsMode mode) { if(x >= width || y >= height) return;

and insert for that //karo flip begin if(height/PANEL_HEIGHT > 1){ bool boolpar = ((height/PANEL_HEIGHT) % 2 == 0) ? true:false; int delY = y/PANEL_HEIGHT; int zvi = y % PANEL_HEIGHT; if (((delY) % 2 == 0)&& boolpar || ((delY) % 2 != 0)&& !boolpar ){ zvi = PANEL_HEIGHT-1 - zvi; y = (PANEL_HEIGHT*delY)+zvi; x = width-1 - x; } } //karo flip end