mini2440 Led,button program

sunil880089
Hi Everyone,

Can Anyone help me to understand Led and Button Program in Mini2440.
How these Led and button Program Works?

please can anyone Explain?

Thanks and Regards
Sunil

Tanmoy
this is a sample program for LED


#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/ioctl.h>

main()
{
  int  fd, input;
  fd = open("/dev/leds",0);

  if (fd<0)
   {
printf("Error opening device or no such device");
    }
  else
   {
printf("Enter the LED no. to turn on: ");
scanf("%d",&input);
ioctl(fd,1,input);
}
  close(fd);
}

Mahaboob Ali
hi every one
can anyone please help me how to run this program in mini2440 board.

thanks And regards
Mahaboob Ali Shaik

davef
Assuming the program is correct:

1) cross-compile it on your host platform
2) transfer the executable to the mini2440
3) run it and
4) hopefully enter your selection using the keyboard

Have you done step 1?

QuanNV
when i built code that Tahomy post, the result is "Error opening device or
no such device". Can someone help me?

QuanNV
Sorry, when i run code that Tahomy posted on Tiny6410, the result is "Error
opening device or no such device". Can someone help me?

Sufiyan mohamed
Hi there 
I was working on a project so I brought mini2440 board and I want to drive
simple lcd(16x2)(alphanumeric lcd). Is it possible? If it is reference
progrm or something?

sufiyan mohamed
Hi there 
I was working on a project so I brought mini2440 board and I want to drive
simple lcd(16x2)(alphanumeric lcd). Is it possible? If it is reference
progrm or something?