Python6 tutorials

Hardware Fundamentals with Python

Drive every peripheral on the Beaver Board from Python — LEDs, buzzer, OLED display, and motors.

PWM LED Brightness in Python

IntermediatePython

Control LED brightness from Python using `pybot.led.brightness()`. Set precise levels, fade in and out in a loop, and cross-fade two LEDs.

LEDBrightnessPWMIntermediate

Buzzer Tones in Python

IntermediatePython

Control the Beaver Board buzzer from Python. Play individual tones, then store a melody as a list of (frequency, duration) pairs and play it with a for loop.

BuzzerSoundMelodyListsIntermediate

OLED Display in Python

IntermediatePython

Drive the Beaver Board's OLED screen from Python. Show text, clear the display, update it in a loop, and build a live seconds counter on the screen.

OLEDDisplayOutputIntermediate

Drive Motors with Python

IntermediatePython

Control the Beaver Board's two drive motors from Python. Move forward, backward, steer by varying speed, and stop on command.

MotorsSpeedMovementIntermediate

Timed Moves in Python

IntermediatePython

Use `time.sleep()` to give each motor move a precise duration. Chain forward, turn, and backward moves to drive a square path, then store the move sequence in a list for easy editing.

MotorsTimedListsMovementIntermediate

Combine LED + Buzzer + OLED

IntermediatePython

Write a multi-peripheral program that uses LEDs, the buzzer, and the OLED display together. Organise each peripheral into its own function, then call them in sequence to create a startup greeting and a status loop.

LEDBuzzerOLEDFunctionsIntermediate