Using more than two input bits for decision making

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 2 and 3.

Moderators: Benj, Mods

Post Reply
icabjeff
Posts: 34
Joined: Thu Jul 27, 2006 11:00 pm
Location: Newton, NJ, USA
Contact:

Using more than two input bits for decision making

Post by icabjeff »

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

Chet
Posts: 61
Joined: Thu Oct 13, 2005 5:05 am
Location: USA
Has thanked: 2 times
Contact:

Post by Chet »

try reading the entire port and make a decision based on the returned value.

Ian
Posts: 110
Joined: Thu Sep 29, 2005 10:53 am
Location: Matrix Multimedia
Been thanked: 1 time
Contact:

Post by Ian »

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.

Post Reply