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