Imported from GitHub: hyrodium/display-auto-rotator · commit fad675f · license MIT
Description
Rotate display with Raspberry Pi Pico and accelaration sensor
README
display-auto-rotator
Rotate display automatically!
graph LR
ACC["Accelaration sensor MMA7361LC"]
PICO["Raspberry Pi Pico as HID keyboard"]
PC["PC (Linux)"]
ACC -->|Analog signal| PICO
PICO -->|"hotkey to run xrandr"| PC
Demo

See more at https://bsky.app/profile/hyrodium.bsky.social/post/3ln6qdv3mbs2j.
Setup
PC (host)
For example, you can setup the hotkeys like this in KDE Plasma environment.
Meta+Ctrl+Home:xrandr --output DP-0 --rotate leftMeta+Ctrl+End:xrandr --output DP-0 --rotate rightMeta+Ctrl+Up:xrandr --output DP-0 --rotate normal

Microcontroller (Raspi pico unit as HID keyboard)
Buy
Order PCB


Print cover
Print STL files in display-auto-rotator_3dp directory.
https://www.thingiverse.com/thing:7035134


Assemble



Write firmware and scripts
- Download and write the CircuitPython firmware (https://circuitpython.org/board/raspberry_pi_pico/).
- Copy the following files to pico drive.
CIRCUITPY/lib/adafruit_hid- Copy from https://circuitpython.org/libraries.
CIRCUITPY/code.py- Copy from this repository.
CIRCUITPY/boot.py- Copy from this repository.
No comments yet. Be the first to ask about this board.