Marcelo Costanzo Miranda / Mbed 2 deprecated LCD_1602

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 #include "meuLCD1602.h"
00003 
00004 DigitalOut led(LED1);
00005 
00006 int i;
00007 char strBuffer[64];
00008 
00009 int main()
00010 {
00011     lcd_init();
00012     lcd_clear();
00013     lcd_cursor_mode(0,0);
00014     
00015     lcd_send_char(0x4F);//O
00016     lcd_send_char(0x4C);//L
00017     lcd_send_char(0x41);//A
00018     lcd_send_char(0x20);// 
00019     lcd_send_char(0x32);//2
00020     lcd_send_char(0x30);//0
00021     lcd_send_char(0x32);//2
00022     lcd_send_char(0x30);//0
00023     
00024     wait_ms(1000);
00025     lcd_clear();
00026        
00027     while(1) 
00028     {
00029         lcd_put_cur(0,0);
00030         sprintf(strBuffer, "%i", i);
00031         lcd_send_string(strBuffer);
00032         i++;
00033         wait_ms(1000);
00034     }
00035 }