Print to LCD
Dependencies: DOGS102 mbed-rtos mbed
Fork of MTDOT_BOX_EVB_Blinky by
main.cpp@13:142a8d831f29, 2016-04-04 (annotated)
- Committer:
- maclobdell
- Date:
- Mon Apr 04 18:21:23 2016 +0000
- Revision:
- 13:142a8d831f29
- Parent:
- 12:d41bdc50f852
- Child:
- 14:95709e8d776a
added debug print of "helloworld"
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
dan | 0:7dec7e9ac085 | 1 | #include "mbed.h" |
maclobdell | 12:d41bdc50f852 | 2 | #include "rtos.h" |
maclobdell | 12:d41bdc50f852 | 3 | #include "NCP5623B.h" |
dan | 0:7dec7e9ac085 | 4 | |
dan | 0:7dec7e9ac085 | 5 | DigitalOut myled(LED1); |
maclobdell | 12:d41bdc50f852 | 6 | I2C led_i2c(I2C_SDA, I2C_SCL); |
maclobdell | 12:d41bdc50f852 | 7 | NCP5623B* led_cont; |
maclobdell | 13:142a8d831f29 | 8 | Serial debug(USBTX, USBRX); |
maclobdell | 12:d41bdc50f852 | 9 | |
dan | 0:7dec7e9ac085 | 10 | int main() { |
maclobdell | 12:d41bdc50f852 | 11 | |
maclobdell | 12:d41bdc50f852 | 12 | led_cont = new NCP5623B(led_i2c); |
maclobdell | 12:d41bdc50f852 | 13 | led_cont->setLEDCurrent(16); |
maclobdell | 13:142a8d831f29 | 14 | debug.baud(115200); |
maclobdell | 13:142a8d831f29 | 15 | debug.printf("hello world\n"); |
maclobdell | 13:142a8d831f29 | 16 | |
dan | 0:7dec7e9ac085 | 17 | while(1) { |
maclobdell | 13:142a8d831f29 | 18 | led_cont->setPWM(NCP5623B::LED_3, 8); |
dan | 0:7dec7e9ac085 | 19 | wait(0.2); |
maclobdell | 12:d41bdc50f852 | 20 | led_cont->setPWM(NCP5623B::LED_3, 0); |
stevep | 4:81cea7a352b0 | 21 | wait(0.2); |
stevep | 4:81cea7a352b0 | 22 | } |
dan | 0:7dec7e9ac085 | 23 | } |