From c1efb819a53831bf4c51a0fe1d508edc497b9816 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?King=20K=C3=A9vin?= Date: Tue, 26 Jan 2016 09:46:36 +0100 Subject: [PATCH] add animation --- main.c | 41 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 38 insertions(+), 3 deletions(-) diff --git a/main.c b/main.c index b3752d9..06e0e42 100644 --- a/main.c +++ b/main.c @@ -20,6 +20,7 @@ #include // standard utilities #include // standard streams #include // error number utilities +#include // stting utilities /* STM32 (including CM3) libraries */ #include // real-time control clock library @@ -75,9 +76,9 @@ int main(void) setbuf(stdout, NULL); // set standard out buffer to NULL to immediately print setbuf(stderr, NULL); // set standard error buffer to NULL to immediately print - printf("welcome to the STM32F1 CuVoodoo display driver\n"); - + printf("welcome to the STM32F1 CuVoodoo vacuum fluorescent display driver\n"); + printf("testing VFD\n"); vfd_on(); // switch on VFD vfd_test(); // show all anodes for (uint32_t i = 0; i < 0x800000; i++) { // show for a bit of time @@ -85,6 +86,40 @@ int main(void) } vfd_clear(); // clear all data + printf("scrolling message\n"); + const char* message = " follow the white rabbit "; // message to display (shifted by left-padded by VFD_MATRIX (12), right padded by VFD_MATRIX-VFD_DIGITS (2)) + for (uint8_t i=0; i