Page 1 of 1

BLK202A-4BR Keypad in Linux

Posted: Sun Jan 19, 2003 5:39 pm
by mattmcmi
I am trying to create an MP3 Jukebox using Linux and C. I am able to pass information to the LCD, however when I try to read from the keypad, I have no luck. I am trying to use the F1 (N) key to enter a menu. Listed below is the code, please show me where I am going wrong.

Code: Select all

while(a != 'N')
{
  clear_display();
  cursor_home();
  write(fd, "     MP3  Jukebox         Ready!    ", 40);
  
  for(i=1; i<100000000; i++);
  write(fd, "     MP3  Jukebox      Press F1 for Menu   ", 40);
  for(i=1; i<100000000; i++);
  read(fd, &a, 1);
}