Jump to content

nes pad, arduino, and autoit


rylorg
 Share

Recommended Posts

I have a nes pad hooked up to an arduino sending button presses over serial via usb and can read them just fine with autoit and the commg udf. The problem is I cant figure out is how to hold down multiple keys easily, like how can i hold down the left key (the arduino sends "L") until the stop signal is sent ("3" for instance) while doing the same for down and the b button(both use the same method). I'm sure its something I'm going to kick myself for not seeing, thanks for any insight.

Link to comment
Share on other sites

Perhaps you could use a binary encoding method to transmit the states of the buttons and use bit logic instead?

i.e.

0 = nothing pressed

1 = A

2 = B

4 = Select

8 = Start

16 = Up

32 = Right

64 = Down

128 = Left

Edited by spudw2k
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...