MATSU-bed + I2CLCD sample (e.g. AQM0802A)
Dependencies: mbed I2cLCD MATSUbed USBDevice
Fork of MASTU-bed_I2CLCD by
AQM0802A: http://akizukidenshi.com/catalog/g/gP-06669/
main.cpp
- Committer:
- Tiryoh
- Date:
- 2018-05-13
- Revision:
- 0:430362be0583
- Child:
- 1:ac8ac251e0c3
File content as of revision 0:430362be0583:
#include "mbed.h" #include "USBSerial.h" #include "I2cLCD.h" #define LED1 P0_29 #define LED2 P0_28 #define LED3 P0_27 #define LED4 P0_26 #define ISP0 P0_4 #define ISP1 P0_16 USBSerial pc; BusOut myled(LED1, LED2, LED3, LED4); I2cLCD lcd(P0_23, P0_22, P0_20); //sda, scl, reset int main() { int timei = 0; myled = 0b0000; //while(pc.readable() == 0); //pc.printf("KEY DETECTED!!\r\nPROGRAM START\r\n"); while(1){ pc.printf("program running...\r\n"); myled = 0b0001; wait(0.1); lcd.cls(); lcd.printf(" %d",timei); timei++; if(timei>500)timei = 0; myled = 0b0000; wait(0.1); } }