Print to LCD

Dependencies:   DOGS102 mbed-rtos mbed

Fork of MTDOT_BOX_EVB_Blinky by Mac Lobdell

Files at this revision

API Documentation at this revision

Comitter:
maclobdell
Date:
Mon Apr 04 18:52:55 2016 +0000
Parent:
13:142a8d831f29
Commit message:
initial commit

Changed in this revision

DOGS102.lib Show annotated file Show diff for this revision Revisions of this file
NCP5623B.lib Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/DOGS102.lib	Mon Apr 04 18:52:55 2016 +0000
@@ -0,0 +1,1 @@
+https://developer.mbed.org/teams/Multi-Hackers/code/DOGS102/#8797ad72a9a8
--- a/NCP5623B.lib	Mon Apr 04 18:21:23 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-https://developer.mbed.org/teams/Multi-Hackers/code/NCP5623B/#d8a72ac9972b
--- a/main.cpp	Mon Apr 04 18:21:23 2016 +0000
+++ b/main.cpp	Mon Apr 04 18:52:55 2016 +0000
@@ -1,23 +1,22 @@
 #include "mbed.h"
 #include "rtos.h"
-#include "NCP5623B.h"
+#include "DOGS102.h"
+#include "font_6x8.h"
 
-DigitalOut myled(LED1);
-I2C led_i2c(I2C_SDA, I2C_SCL);
-NCP5623B* led_cont;
 Serial debug(USBTX, USBRX);
+SPI lcd_spi(SPI1_MOSI, SPI1_MISO, SPI1_SCK);
+DigitalOut lcd_spi_cs(SPI1_CS, 1);
+DigitalOut lcd_cd(XBEE_ON_SLEEP, 1);
+DOGS102* lcd;
     
 int main() {
     
-    led_cont = new NCP5623B(led_i2c);
-    led_cont->setLEDCurrent(16);
-    debug.baud(115200);        
-    debug.printf("hello world\n");
+    char buffer[32];
+        
 
-    while(1) {
-         led_cont->setPWM(NCP5623B::LED_3, 8);
-        wait(0.2);
-        led_cont->setPWM(NCP5623B::LED_3, 0);
-        wait(0.2);
-    }
+    lcd = new DOGS102(lcd_spi, lcd_spi_cs, lcd_cd);
+    sprintf(buffer, " Hello World! ");      
+    lcd->writeText(6, 1, font_6x8, buffer, strlen(buffer));
+
+ 
 }