Connect It
Channel It
Script It
This script will automatically run in the REPL when the "Trigger Script" message is received on the channel. You can test the scipt with the play button in the bottom corner.
print('Wiggle Motor!') motor.run(50) time.sleep(1) motor.run(-50) time.sleep(1) motor.run(50) time.sleep(1) motor.run(-50) time.sleep(1) motor.stop() print('Wiggle Finished')
Wiggles a motor back and forth.
print('hello!')
Prints whatever is inside the () in the REPL.
motor.run(50)
Starts spinning the single motor at the speed inside the ().
Use a negative number to spin opposite direction.
motor.run_both(50)
Starts spinning both sides of the dual motorat the speed inside the ().
Use a negative number to spin opposite direction.
motor.run_left(50)
Starts spinning the left side of the dual motor .
motor.run_right(50)
Starts spinning the right side of the dual motor.
motor.run_to(180)
Sends motor to degree position inside the ().
motor.run_to_left(180)
Sends left side of the dual motor to degree position inside the ().
motor.run_to_right(180)
Sends right side of the dual motor to degree position inside the ().
motor.run_angle(180)
Moves the motor the number of degrees inside the ().
motor.run_angle_left(180)
Moves left side of the dual motor the number of degrees inside the ().
motor.run_angle_right(180)
Moves right side of the dual motor the number of degrees inside the ().
motor.stop()
Stops the motor.
motor.angle
Returns the motor's current angle (0–359).
time.sleep(1)
Pauses program for a number of seconds.
channel.send('message')
Sends a message to the current channel.
REPL