63 lines
946 B
C++
63 lines
946 B
C++
#include <Arduino.h>
|
|
|
|
|
|
|
|
#include "flipdot.h"
|
|
#include "image.h"
|
|
|
|
|
|
|
|
|
|
Image flip;
|
|
|
|
unsigned long loopmillis=0;
|
|
unsigned long last_update=0;
|
|
|
|
|
|
|
|
void setup() {
|
|
flip.init();
|
|
|
|
Serial.begin(115200);
|
|
}
|
|
|
|
|
|
void loop() {
|
|
loopmillis = millis();
|
|
|
|
static unsigned long last_change=0;
|
|
static bool color=0;
|
|
if (loopmillis-last_change >= 10000)
|
|
{
|
|
Serial.print("Change to Solid color ="); Serial.println(color);
|
|
flip.setBuffer_solid(color);
|
|
color=1-color;
|
|
|
|
last_change=loopmillis;
|
|
}
|
|
|
|
|
|
if (loopmillis > last_update + UPDATE_INTERVAL)
|
|
{
|
|
Serial.print("UpdateByColumn ");
|
|
bool result=flip.updateByColumn(0,0,0,0);
|
|
Serial.println(result);
|
|
|
|
last_update=loopmillis;
|
|
}
|
|
|
|
|
|
/*
|
|
if (loopmillis > last_update + UPDATE_INTERVAL)
|
|
{
|
|
flip.loop_drawClearTest();
|
|
//loop_testDots();
|
|
|
|
last_update=loopmillis;
|
|
}
|
|
*/
|
|
|
|
|
|
|
|
}
|