Dan, You are spot on. TC Logo only lets you check the status of one joystick button, not both. So we were limited to using one button as a toggle. Easy enough to track the status of the last command sent to the motor with a variable, but the check for a button press only worked sporadically due to timing issues and Logo's limited program flow features. I strongly suspect that the IBM, especially with qbasic, will allows us to write a much tighter polling loop and/or allow the checking of more than one joystick button (one for off, one for on). D On Wed, Jan 18, 2017 at 2:58 AM Dan Roganti via vcf-midatlantic < vcf-midatlantic@lists.vintagecomputerfederation.org> wrote:
On Wed, Jan 18, 2017 at 2:34 AM, Dan Roganti <ragooman@gmail.com> wrote:
On Wed, Jan 18, 2017 at 1:17 AM, Evan Koblentz via vcf-midatlantic <
vcf-midatlantic@lists.vintagecomputerfederation.org> wrote:
Doug wrote:
If you are satisfied with BASIC as a solution, peek and poke should be
sufficient for control if the motor control hardware is memory mapped
on the Apple. If machine language routines are actually needed, its
likely that folks here can write them for you easily since integrating
them with BASIC is a known quantity.
Which brings us back to my original problem. For the program I wrote in
Lego LOGO, there are places where I need to check the status of a motor --
is it on or off -- before proceeding. Motors are mapped (by you the
programmer) to ports 0-5 on the interface box. You can turn a port on/off,
but there's no way to read its status! Crazy yet true.
You the programmer are responsible for keeping track if you left the motor
on or off
in the case of a Motor, which is a Output signal from that Lego interface.,
this is done merely by having variable defined to keep track of different
States within your project.
That is contained in your code, this is a basic principle for any project,
which involves a motor interface, such as in a robot.
[snip]
in other words,
assign a variable to track the current state of the motor output, via that
motor subroutine
And just check that >variable< anytime you want, anywhere in your code
Dan