from microbit import * import superbit display.show(Image.HAPPY) superbit.motor_control_dual(superbit.M1, superbit.M3, 0, 0, 0) superbit.motor_control_dual(superbit.M2, superbit.M4, 0, 0, 0) while True: superbit.motor_control_dual(superbit.M1, superbit.M3, -255, 255, 0) superbit.motor_control_dual(superbit.M2, superbit.M4, -255, 255, 0) sleep(1000) superbit.motor_control_dual(superbit.M1, superbit.M3, 255, -255, 0) superbit.motor_control_dual(superbit.M2, superbit.M4, 255, -255, 0) sleep(1000)
from microbit import display, Image import superbit display.show(Image.HAPPY) while True: superbit.motor_control_dual(superbit.M1, superbit.M3, -255, -255, 0)
def lightning(): superbit.motor_control_dual(superbit.M1, superbit.M4, 255, 255, 0) sleep(1000) superbit.motor_control_dual(superbit.M1, superbit.M4, 0, 0, 0) superbit.motor_control_dual(superbit.M2, superbit.M3, 0, 0, 0) superbit.motor_control_dual(superbit.M2, superbit.M3, 255, 255, 0) sleep(1000) superbit.motor_control_dual(superbit.M1, superbit.M4, 0, 0, 0) superbit.motor_control_dual(superbit.M2, superbit.M3, 0, 0, 0) superbit.motor_control_dual(superbit.M1, superbit.M4, 255, 255, 0) sleep(1000) superbit.motor_control_dual(superbit.M1, superbit.M4, 0, 0, 0) superbit.motor_control_dual(superbit.M2, superbit.M3, 0, 0, 0)
from microbit import * import microbit import superbit display.show(Image.HAPPY) while True: superbit.motor_control_dual(superbit.M1, superbit.M3, 0, 100, 0) microbit.sleep(500) superbit.motor_control_dual(superbit.M1, superbit.M3, 0, 0, 0) microbit.sleep(1000) superbit.motor_control_dual(superbit.M1, superbit.M3, 100, 0, 0) microbit.sleep(500) superbit.motor_control_dual(superbit.M1, superbit.M3, 0, 0, 0) microbit.sleep(1000)