Post a New Question

Computers

posted by on .

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:
Answer:

Related Questions

More Related Questions

Post a New Question