P2 User Manual1
P2 User Manual1
CODE OVERVIEW
int adc_key_in;
Define the adc_key_in as a storage space of integer.
Referring to the Figure above, the GLCD are only
required to plug into Arduino Duemilanove then put
int joy_stick = 0; Write a string of number in every row.
Define the joy_stick I/O as analog port 0.
lcd.LCD_write_string_big(0,0,”012345”,MENU_NOR
#define LCD_Backlight 7
MAL);
Define the LCD_Backlight pin as ditial pin 7.
Write a string of number in big font size.
#define NUM_KEYS 5
Define the total number of key is 5.
References:
1. http://tronixstuff.wordpress.com/2011/03/1
2/the-dfrobot-lcd4884-lcd-shield/
2. http://www.dfrobot.com/wiki/index.php?
title=LCD4884_Shield_Fro_Arduino_(SKU:DF
R0092)
lcd.LCD_init();
Graphic LCD Initialize.
Lcd.LCD_clear();
Clear the GLCD screen.
pinMode(LCD_Backlight, OUTPUT);
Make the LCD_Backlight pin as output.
lcd.LCD_draw_bmp_pixel(2,1,cytron,80,24);
Display the picture in Bitmap format in (2nd row, 1st
column, cytron logo, picture's width, picture's
height).
lcd.LCD_write_string(0,a,”01234567890123”,MENU_
NORMAL);