Post a New Question


posted by .

How would you write a linux program to read data from a joystick, and turn that data into a command that is pushed onto the queue?

  • Computers -

    linux is not a programming language. A simple perl program might be

    my @queue;
    open JS,"/dev/joystick";
    while (<JS>) {
    push @queue, cmd($_);
    close JS;

    sub cmd {
    my $js = shift;
    my $cmd;
    ... code to form command ...
    return $cmd;

Answer This Question

First Name:
School Subject:

Related Questions

More Related Questions

Post a New Question