Using the <InGamePort :mask> Function

From version 6.4 MSW Logo has incorporated a new function for reading the four Analogue to Digital (AtoD) lines of the Games Port. This means that apart from reading the changing position of a Joysick and using these values to control your MSW Logo procedures, you can now use MSW Logo for monitoring all sorts of 'real world' experiments using external sensors, or anything that requires an AtoD conversion!

NOTE: The InGamePort function reads one line at a time. Normal Joysticks have resistances across only TWO of the four lines. If you instruct MSW Logo to read an input line that does not have a resistance across it, the system will 'hang' until the routine has finished its counting loop. This may be between 30 seconds on a fast system to several minutes on a slow system - be patient. Don't reset your system. It WILL exit the loop eventually.

The general usage is:

make "InValue InGamePort X ;(Where "X" can be 1, 2, 4, or 8)

NOTE: There IS a space between the command and the "mask" value.

Further information about the Games Port is available here.

<- Back -Menu- Next ->