Skip to content
PyDevicesPublic

About

Portable display, audio, event, board-config, and hardware-driver packages for MicroPython, CircuitPython, and CPython.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

675 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A red rectangle above a green one and a blue one, on black

pydevices

pydevices is the part of OmniPython that talks to hardware: displays, touch, audio, USB, Bluetooth LE, Wi-Fi and timers, with one board config per board and the same program on MicroPython-compatible boards, CircuitPython-compatible boards, a desktop, a browser and an Android phone.

pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ pydevices-desktop
import mip
mip.install("github:PyDevices/pydevices/board_configs/fbdisplay/esp32-p4-wifi6-touch-lcd-4b",
            index="https://PyDevices.github.io/mip")

The first is for a desktop. The second installs one board's config on that board, and pydevices with it; Install has every board and channel.

from board_config import display_drv

w, h = display_drv.width, display_drv.height
print("display:", w, "x", h)

display_drv.fill(0x0000)
display_drv.fill_rect(16, 16, w - 32, h // 2 - 24, 0xF800)
display_drv.fill_rect(16, h // 2 + 8, w // 2 - 24, h // 2 - 24, 0x07E0)
display_drv.fill_rect(w // 2 + 8, h // 2 + 8, w // 2 - 24, h // 2 - 24, 0x001F)
display_drv.show()
display: 320 x 480

On a desktop that opens a window at the desktop config's 320 × 480 and draws the picture at the top of this page. On a board it draws the same layout at the size of its screen.

Docs · Examples · Roadmap

OmniPython is made by PyDevices.

About

Portable display, audio, event, board-config, and hardware-driver packages for MicroPython, CircuitPython, and CPython.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages