Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pramasoul/micropython-SHARP_Memory_Display
micropython driver for SHARP memory display
https://github.com/pramasoul/micropython-SHARP_Memory_Display
Last synced: 3 months ago
JSON representation
micropython driver for SHARP memory display
- Host: GitHub
- URL: https://github.com/pramasoul/micropython-SHARP_Memory_Display
- Owner: pramasoul
- License: mit
- Created: 2015-10-31T05:44:08.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-11-01T17:43:38.000Z (about 9 years ago)
- Last Synced: 2024-04-29T11:34:13.429Z (6 months ago)
- Language: Python
- Size: 145 KB
- Stars: 8
- Watchers: 3
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-micropython - micropython-SHARP_Memory_Display - MicroPython driver for SHARP memory display. (Libraries / Display)
README
# micropython-SHARP_Memory_Display
A [micropython] (http://micropython.org/) driver for [SHARP memory displays] (http://www.sharpmemorylcd.com/aboutmemorylcd.html), including the [SHARP Memory Display Breakout] (https://www.adafruit.com/products/1393) for the [LS013B4DN04] (http://www.sharpmemorylcd.com/1-35-inch-memory-lcd.html) ([application info] (http://www.sharpmemorylcd.com/resources/LS013B4DN04_Application_Info.pdf), [datasheet] (http://www.mouser.com/ds/2/365/LS013B4DN04(3V_FPC)-204284.pdf)) from [AdaFruit] (https://www.adafruit.com/)## Example
```python
from sharp_mem_display import SharpMemDisplay
screen = SharpMemDisplay(2, 'Y5', 96, 96)
screen.clear()
xdim = screen.xdim
ydim = screen.ydim
x = xdim // 2
y = ydim // 2
mls = 255 * xdim // 8
on = True
while True:
if on:
on = any(sum(line) < mls for line in screen.lines)
else:
on = all(sum(line) == 0 for line in screen.lines)
for i in range(1000):
x = (x + rng()%3 - 1) % xdim
y = (y + rng()%3 - 1) % ydim
screen.set_pix(x, y, on)
screen.sync()
```