by careyg » Mon Aug 09, 2010 10:38 pm
by careyg
Mon Aug 09, 2010 10:38 pm
Hullo,
Am continuing to fiddle around with Basic.hex this evening (though I must iron a shirt and hit the sack soon...).
Question
is it possible, when using the SERVO command (SERVO <ID> = <POSN>) to use a variable for <ID>? Whenever I attempt this, Servo 0 moves, rather than the expected servo.
e.g. something random (and valueless...) like:
10 Let A = $rnd % 16
20 servo A=$rnd%200
will always wiggle that same leg.
I'm guessing Servo expects a constant, and the interpreter is doing its best for me and getting a 0 for A, unless i'm supposed to use a special character to dereference the value for this instruction?
Anyway, probably time to shut Huno off for the night!
Cheers,
G.
Hullo,
Am continuing to fiddle around with Basic.hex this evening (though I must iron a shirt and hit the sack soon...).
Question
is it possible, when using the SERVO command (SERVO <ID> = <POSN>) to use a variable for <ID>? Whenever I attempt this, Servo 0 moves, rather than the expected servo.
e.g. something random (and valueless...) like:
10 Let A = $rnd % 16
20 servo A=$rnd%200
will always wiggle that same leg.
I'm guessing Servo expects a constant, and the interpreter is doing its best for me and getting a 0 for A, unless i'm supposed to use a special character to dereference the value for this instruction?
Anyway, probably time to shut Huno off for the night!
Cheers,
G.