diff --git a/source/main.cpp b/source/main.cpp index f53f3c9b145e71a9bace179a4f2845cafb94ccbe..3ea17390ee4ae12ca6be4435be0395f130c04619 100755 --- a/source/main.cpp +++ b/source/main.cpp @@ -180,17 +180,19 @@ int main() { UBIT.display.scroll("BLOCKS!"); // XXX: simple debug test to check my FLASH images were stored correctly - // a simple clocker to check frame rate - bool strober = false; while (true) { - // display new random blocks each second - Block block; - UBIT.display.print(block.image(), 2, 2); - // display clocker - UBIT.display.image.setPixelValue(0, 0, strober); - UBIT.sleep(1000); // 1000ms or 1s sleep - // invert the clocker - strober = !strober; + // scroll random blocks down the screen + Block block; // make a new random Block + // starting positions: + int x = 1; + int y = -3; + // print image until scrolled down off the screen + while (y < 6) { + UBIT.display.clear(); + UBIT.display.print(block.image(), x, y); + y++; + UBIT.sleep(350); // 350ms sleep for 2.85 FPS + } } // TODO: potentially remove this call, if clarified that it is not required.