Skip to content

Instantly share code, notes, and snippets.

@antonvh
antonvh / main.py
Last active October 19, 2023 08:10
PS3/PS4 LEGO MINDSTORMS remote control script with front wheel calibration and shoulder button trim.
#!/usr/bin/env pybricks-micropython
from pybricks.ev3devices import (Motor, TouchSensor, ColorSensor,
InfraredSensor, UltrasonicSensor, GyroSensor)
from pybricks.parameters import (Port, Stop, Direction, Button, Color,
SoundFile, ImageFile, Align)
from pybricks.tools import print, wait, StopWatch
import struct