Connections (DOM)

Coding Area (worker)

Unit Tests:


CommandMeaningUsage
channel.msgreturns the last value readcommand.msg
channel.sendsends a new value to the current channelchannel.send('test')
channel.postposts to any channelchannel.post('/fred','test')
motor.runRuns motor at speed 10motor.run(10)
motor.stopStops motor motor.stop()
motor.run_toTurns to a specific position motor.run_to(pos = 10, port = 1, direction = 2)
motor.run_angleTurns thru a specific angle motor.run_angle(angle = 10, port = 1, direction = 2)
motor.positionReturns the motor positionmotor.position
sensor.leftAngleReturns the position of the left joysticksensor.leftAngle
sensor.reflectionReturns the value of reflected lightsensor.reflection
There are a lot more methods and properties, just type sensor. and hit TAB in the REPL. On motors, port is left(1) or right(2) and direction is CW (0), CCW (1), closest (2), or longest (3)

Advanced DOM coding area