I’ve extended the MicroPython examples for the BrainPad Classic so that all of the devices work: scruss/brainpad-micropython: Micropython examples for the BrainPad Classic (BP2) from GHI Electronics.
The ones that already worked in the original examples repo are:
- buttons
- accelerometer
- LEDs
- light sensor
- OLED screen
I’ve added:
- temperature sensor: although my calibration may be a bit off on the MCP9701a used on the board
- timer blink example: STM32 Timers are cool and we should use them
- PWM RGB LED example: floating-point silliness with HSV(ish) Colour Wheel in Python
- buzzer: simple tones plus tunes (in RTTTL) via dhylands / upy-rtttl
- servos: I may have forgotten to put the example in there, but the standard Servo(1) code should work.
Yes, it would be nice to have a slick unified library like the BBC micro:bit does. For later, though.
Other resources:
- BrainPad Classic/BP2 Schematic
- STM32F401RE summary and datasheet: because sometimes you need to know what Timer talks to which Pin …