I need to know how I go about using all the individual input bits during decision making. I'm trying to see if I can use flowcode with e-blocks to create a handicapped switch adapted joystick and I need to use all 8 individual bits on one input port. I'm unable to get beyond using two individual bits at a time for input.
Jeff
Using more than two input bits for decision making
-
- Posts: 110
- Joined: Thu Sep 29, 2005 10:53 am
- Location: Matrix Multimedia
- Been thanked: 1 time
- Contact:
Masks can be used to select certain bits from the port as well if you need to check only some of the inputs.
Also, if the joystick you mentioned uses analogue pots you can try reading in the analogue input from those pots and using the value from that in a similar manner to using the whole port value as Chet suggested.
Most PC joysticks have the pots all ready in place so you can just tap into their outputs.
You can use SampleADC to sample the anlogue input and readHigh or ReadLow to get the values. For a basic system the high 0-255 value may be enough on it's own.
Also, if the joystick you mentioned uses analogue pots you can try reading in the analogue input from those pots and using the value from that in a similar manner to using the whole port value as Chet suggested.
Most PC joysticks have the pots all ready in place so you can just tap into their outputs.
You can use SampleADC to sample the anlogue input and readHigh or ReadLow to get the values. For a basic system the high 0-255 value may be enough on it's own.