John Bunda
/
DigoleSerialDisp1
UART object
Fork of DigoleSerialDisp1 by
Diff: test.cpp
- Revision:
- 6:fc42c0dc7b7f
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test.cpp Sun Nov 22 16:01:18 2015 +0000 @@ -0,0 +1,70 @@ +#include "mbed.h" +#include "DigoleSerialDisp.h" + +DigoleSerialDisp display(dp11, dp12);//UART DigoleSerialDisp(PinName TX, PinName RX); + +int main (int argc, char**argv) +{ +// display.baud(9600); + wait(1); //wait for DigoleSerialDisp to power up + + + display.write("CL\r"); + + + while(1) + { + display.write("SD3\r\n");//set rotation 0=0deg,1=90deg,2=180deg,3=270deg + display.write("TRT");//offset Line 1 in housing + display.write("SF3\rTT Line 1\r\n"); + display.write("TRT");//next line + wait(0.5); + display.write("SF3\r\n"); + display.write("CT5\r\n");//set contrast (0-30) + display.write("ESC0f0\r\n"); + //display.write("SD0\r\n");//set rotation 0=0deg,1=90deg,2=180deg,3=270deg + display.write("TT Line 2\r\n"); + display.write("TRT"); + wait(0.5); + display.write("SF3\r\n"); + display.write("ESC6\r\n"); + display.write("CT10\r\n");//set contrast (0-30) + //display.write("SD1\r\n");//set rotation 0=0deg,1=90deg,2=180deg,3=270deg + display.write("TT Line 3\r\n"); + display.write("TRT"); + wait(0.5); + display.write("SF3\r\n"); + display.write("ESC16\r\n"); + display.write("CT80\r\n");//set contrast (0-30) + //display.write("SD2\r\n");//set rotation 0=0deg,1=90deg,2=180deg,3=270deg + display.write("TT Line 4\r\n"); + display.write("TRT"); + wait(0.5); + display.write("SF3\r\n"); + display.write("ESC1ff\r"); + display.write("CT20\r\n");//set contrast (0-30) + //display.write("SD3\r\n");//set rotation 0=0deg,1=90deg,2=180deg,3=270deg + display.write("TT Line 5\r\n"); + display.write("TRT"); + wait(0.5); + display.write("SF3\r\n"); + display.write("ESC0f\r\n"); + display.write("CT525\r\n");//set contrast (0-30) + display.write("TT Line 6\r\n"); + display.write("TRT"); + wait(0.5); + display.write("BL100\r\n"); + display.write("TRT"); + wait(0.5); + //display.write("FR1111\r\n"); + wait(1); + display.write("CL\r\n"); + + + display.drawLine(10,10,100,100); + display.drawCircle(20,20,20,20); +// display.write("Testing the display."); +//DigoleSerialDisp.write(0xD); + wait(1); + } + } \ No newline at end of file