To access the full video please subscribe to FLLCasts.com
- #2602
- 13 Mar 2026
"Display "Hello World" text on the screen"
from hub import light_matrix import runloop async def main(): light_matrix.write("Hello World") runloop.run(main())
from hub import light_matrix import runloop hours = 2 async def main(): light_matrix.write(str(hours)) runloop.run(main())
from hub import light_matrix import random import runloop hours = random.randint(1, 12) async def main(): light_matrix.write(str(hours)) runloop.run(main())
from hub import light_matrix import random import runloop hours = random.randint(1, 12) minutes = random.randint(1, 60) async def main(): light_matrix.write(str(minutes)) runloop.run(main())
"Display the hours and minutes variables separated by a colon."
from hub import light_matrix import random import runloop hours = random.randint(1, 12) minutes = random.randint(1, 60) async def main(): light_matrix.write(str(hours) + ":" + str(minutes)) runloop.run(main())
30
hours = random.randint(1, 12) hour_degrees = hours * 30
6
minutes = random.randint(1, 60) minutes_degrees = minutes * 6
from hub import port import motor import random import runloop hours = random.randint(1, 12) hour_degrees = hours * 30 minutes = random.randint(1, 60) minutes_degrees = minutes * 6 async def main(): motor.run_for_degrees(port.E, hour_degrees, 360) runloop.run(main())
from hub import port import motor import random import runloop hours = random.randint(1, 12) hour_degrees = hours * 30 minutes = random.randint(1, 60) minutes_degrees = minutes * 6 async def main(): motor.run_for_degrees(port.E, hour_degrees, 360) motor.run_for_degrees(port.F, minutes_degrees, -360) runloop.run(main())
"Program the robot to wait 5 seconds after moving its arrows and then turn them back."
from hub import port import motor import random import runloop hours = random.randint(1, 12) hour_degrees = hours * 30 minutes = random.randint(1, 60) minutes_degrees = minutes * 6 async def main(): motor.run_for_degrees(port.E, hour_degrees, 360) motor.run_for_degrees(port.F, minutes_degrees, -360) await runloop.sleep_ms(5000) motor.run_for_degrees(port.E, hour_degrees, -360) motor.run_for_degrees(port.F, minutes_degrees, 360) runloop.run(main())
from hub import port, light_matrix import motor import random import runloop hours = random.randint(1, 12) hour_degrees = hours * 30 minutes = random.randint(1, 60) minutes_degrees = minutes * 6 async def main(): motor.run_for_degrees(port.E, hour_degrees, 360) motor.run_for_degrees(port.F, minutes_degrees, -360) await runloop.sleep_ms(5000) motor.run_for_degrees(port.E, hour_degrees, -360) motor.run_for_degrees(port.F, minutes_degrees, 360) light_matrix.write(str(hours) + ":" + str(minutes)) runloop.run(main())