Back
/*********************************************************************
xBoard(TM) v2.0 Sample Programs
-------------------------------
Description : To demonstrate the use of IR remote control
Interface API Functions. Press any of key on
Remote control and LCD will show its KEY CODE.
NOTE: To RUN this demo
*LCD Must be connected.
*JP1 Must be connected.
Author : Avinash Gupta 2008
Web : www.eXtremeElectronics.co.in
**********************************************************************/
#include <avr/io.h>
#include "lcd.h"
#include "remote.h"
void main()
{
uint8_t remote_command=0; //The key code of key pressed
//Initialize LCD System
LCDInit(LS_BLINK);
//Clear LCD
LCDClear();
//Initialize Remote System.
RemoteInit();
while(1)
{
LCDClear();
LCDWriteString("xBoard R/C TST");
LCDWriteStringXY(0,1,"Key Code:");
LCDWriteInt(remote_command,3);
remote_command=GetRemoteCmd(1); //Wait for a key press
}
}
Top |