[vcf-midatlantic] Why isn't my program working?
Dan Roganti
ragooman at gmail.com
Wed Feb 1 19:50:21 EST 2017
another update,
this is regarding the original code found in the Teacher's manual
which is how we started and arrived at this problem
that was the pdf file in the "Lego Lines" Zip file, which also contained
the disk image.
We mentioned that Basic code was likely just demo code to fiddle some bits
on the port address to spin a motor, blink a lamp, or sense a contact
switch. As the Lego folks instead pushed their Lego Logo software, with
it's flashy graphics to impress the kids in their education market. So,
they apparently didn't use this Basic code in a live example, eg. integrate
all of this code with their subroutines and the Main code into a
functioning robot..
The variable DB, which is used in each of their subroutines for the Read
Port and Write Port operations, was getting corrupted in our version of the
code. And this created that stuttering symptom. When any of these
subroutines are used in separate programs, they work perfectly fine.
And as we observed, our code also works perfectly fine when spinning just
one motor. The only time the robot goes bezerk is when trying to spin
multiple motors. Which is needed since the robot requires both motors for
locomotion.
So, I had to use separate variable for the Read Port and Write Port
operations for that port address to the robot interface. So I just used DR
for the Read Port, and DW for the Write port. And then the associated code
in each Read and Write subroutine which used that variable was made to
match as well.
And so I sent Evan the latest disk image and everything works fine now with
his robot. No more stuttering motors
this is the screenshot from the program, its only 40col, a kind of
telemetry display
http://www.rogtronics.net/files/hobby/comp/apple/Robot-Lego/images/ROBOT0.671.jpg
I was going to update the 80col version with this bug fix too, this is more
of a flow chart display
http://www.rogtronics.net/files/hobby/comp/apple/Robot-Lego/images/ROBOT0.68.jpg
but since Evan's recent foray in learning Binary [hehe]
he will continue using the new code we made with the hard-coded values
recently
Another attempt to use the Applesoft Basic compiler is another goal, to
speed up eveything
just have to find the disk images
#$#%@^#$
Dan
More information about the vcf-midatlantic
mailing list