LEGO DACTA COMMAND SHEET
Basic Commands for Programming:
talkto "motora |
prepares a pathway to the device attached to output port c |
talkto [motora sounde lampc] |
prepares multiple pathways to different devices |
on |
turns the device that was "talked to" on |
onfor 25 |
turns something on for a specific amount of time |
wait 25 |
makes the computer pause for indicated time |
rd |
reverses the direction of the motor |
off |
turns the last device "talked to" off |
ao |
turns everything that is running off |
cc |
clears the command box of all commands |
setpower 4 |
sets the power of the motor (scale 1 to 8) |
show temp2 |
shows current value of the temperature input |
waitunitl [angle6 > 45] |
makes computer pause until the condition is true |
if angle6 > 45 [command to execute] |
will only execute the command if the condition is true |
repeat 5 [ ] |
will repeat the command in brackets 5 times |
forever [ ] |
will repeat the command in brackets forever |
NOTE: All time measurements are in tenths of a second. It doesn't matter if you use capitals or lower case letters when you're programming with LEGO dacta.
Physics | Chemistry | Biology | Engineering | Computer Science | Understanding Science and Technology