scroller for 4 digit display, rides on top of DigitDisplay and scrolls messages of arbitrary length

Dependencies:   DigitDisplay mbed

Committer:
mfiore
Date:
Sun Sep 07 05:30:25 2014 +0000
Revision:
0:f8d65945b096
initial commit - looks good and supports 0-9, a-b, hyphen, and underscore

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mfiore 0:f8d65945b096 1 #include "mbed.h"
mfiore 0:f8d65945b096 2 #include "DisplayManager.h"
mfiore 0:f8d65945b096 3
mfiore 0:f8d65945b096 4 using namespace std;
mfiore 0:f8d65945b096 5
mfiore 0:f8d65945b096 6 int main() {
mfiore 0:f8d65945b096 7 // use connector D3 on the sensor shield board
mfiore 0:f8d65945b096 8 DisplayManager display(D3, D4);
mfiore 0:f8d65945b096 9 //DigitDisplay display(D3, D4);
mfiore 0:f8d65945b096 10
mfiore 0:f8d65945b096 11 display.clear();
mfiore 0:f8d65945b096 12 char chars[] = "jon and mike are cool dudes";
mfiore 0:f8d65945b096 13
mfiore 0:f8d65945b096 14 while (true) {
mfiore 0:f8d65945b096 15 display.showMessage(chars, sizeof(chars));
mfiore 0:f8d65945b096 16 /*
mfiore 0:f8d65945b096 17 display.writeRaw(0, 0x01);
mfiore 0:f8d65945b096 18 wait(5);
mfiore 0:f8d65945b096 19 display.writeRaw(0, 0x02);
mfiore 0:f8d65945b096 20 wait(5);
mfiore 0:f8d65945b096 21 display.writeRaw(0, 0x04);
mfiore 0:f8d65945b096 22 wait(5);
mfiore 0:f8d65945b096 23 display.writeRaw(0, 0x08);
mfiore 0:f8d65945b096 24 wait(5);
mfiore 0:f8d65945b096 25 display.writeRaw(0, 0x10);
mfiore 0:f8d65945b096 26 wait(5);
mfiore 0:f8d65945b096 27 display.writeRaw(0, 0x20);
mfiore 0:f8d65945b096 28 wait(5);
mfiore 0:f8d65945b096 29 display.writeRaw(0, 0x40);
mfiore 0:f8d65945b096 30 wait(5);
mfiore 0:f8d65945b096 31 */
mfiore 0:f8d65945b096 32 }
mfiore 0:f8d65945b096 33 }