#include #include "flipdot.h" Flipdot flipdot; unsigned long loopmillis=0; unsigned long last_update=0; #define UPDATE_INTERVAL 5 void setup() { flipdot.init(); Serial.begin(115200); } int countz=0; void loop_testDots(); void loop_drawClearTest(); void loop() { loopmillis = millis(); loop_drawClearTest(); //loop_testDots(); } #define COLUMNS 50 #define ROWS 16 void loop_testDots() { static bool init=false; if (!init) { flipdot.row=0; Serial.println("Clearing Display"); for (int l=0;l last_update + UPDATE_INTERVAL) { Serial.print("count="); Serial.print(countz);Serial.print(": "); //setting colX to 128, 32, 8,2 (or a combination of), then appling 12V to driver and GND to Clear, clears these colums // this applies +12v to selected columns //setting colX to 64,16,4,1 (or a combination of), then setting row shift registers to some setting sets the selected dots // this applies GND to selected columns //reset pin on annax board input should be used (not pulled to gnd for a short time) after dots have been flipped (to disable potentially activated transistors) //cycle testing set dots flipdot.selectColumnSet(countz/ROWS); //lower column number is on the left flipdot.row=pow(2, (countz)%ROWS);//low significant bits are lower rows (when connector at top) /*Serial.print("Row="); Serial.print(row); Serial.print(" Col="); for (uint8_t i=0;i<7;i++) { Serial.print(","); Serial.print(col[i]); } Serial.println();*/ //reset pin on ribbon cable high (12Vpullup/open), then low (via Transistor) unsigned long starttime=micros(); flipdot.shiftData(); flipdot.setSelectedDot(); unsigned long shiftduration=micros()-starttime; Serial.println(""); Serial.print("Duration="); Serial.println(shiftduration); last_update=loopmillis; countz++; if (countz>=ROWS*COLUMNS) { countz=0; init=false; } } }