yasuyuki onodera / Mbed 2 deprecated mbed_AQM1602

Dependencies:   AQM1602 mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 //**********************
00002 // AQM1602 demo for mbed
00003 //
00004 // LPC1768 flash=512KB, ADC=12bits
00005 // LPC11U35 flash=64KB, ADC=10bits
00006 // Nucleo ADC=12bits
00007 //
00008 // (C)Copyright 2015 All rights reserved by Y.Onodera
00009 // http://einstlab.web.fc2.com
00010 //**********************
00011 #include "mbed.h"
00012 #include "AQM1602.h"
00013 
00014 #if defined(TARGET_LPC1768)
00015 I2C i2c(p28,p27);
00016 #endif
00017 // for TG-LPC11U35-501
00018 #if defined(TARGET_LPC11U35_501)
00019 I2C i2c(P0_5,P0_4);
00020 #endif
00021 // for Nucleo
00022 #if defined(TARGET_NUCLEO_F401RE)
00023 I2C i2c(D14,D15);
00024 #endif
00025 
00026 AQM1602 lcd(i2c);
00027 
00028 int main() {
00029 
00030     lcd.locate(0,0);
00031     lcd.print("AQM1602");
00032 
00033     lcd.locate(0,1);
00034     lcd.print("I2C LCD module");
00035 
00036     while(1);
00037 
00038 }