Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/AnthonyKNorman/MicroPython_SSD1306
https://github.com/AnthonyKNorman/MicroPython_SSD1306
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/AnthonyKNorman/MicroPython_SSD1306
- Owner: AnthonyKNorman
- Created: 2016-10-24T08:05:54.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2016-10-24T08:06:16.000Z (about 8 years ago)
- Last Synced: 2024-08-02T20:45:23.997Z (4 months ago)
- Language: Python
- Size: 6.84 KB
- Stars: 9
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-mpython - MicroPython_SSD1306 - ESP8266 driver for SSD1306 OLED 128x64 displays. (精选驱动库 / 显示类)
- awesome-micropython - MicroPython_SSD1306 - ESP8266 driver for SSD1306 OLED 128x64 displays. (Libraries / Display)
README
ESP8266 Micropython driver for SSD1306 OLED 128x64 display.
**font5x7.fnt** is a 5 x 7 font file. It holds the font in pure binary and so uses only 480 bytes
When the display needs a character it reads the five bytes it needs from the file rather than loading the whole font into memory**bmp.py** converts a 24-bit BITMAP file to a displayed image. Although this is a colour format, the image must be black and white.
**lcd_gfx.py** is not my work. It came from here https://forum.micropython.org/viewtopic.php?t=195
**icon.bmp** is the bitmap that is displayed in main.py. Be aware there is cuerrently no positioning, size check or resizing.
invoke the display with:
from SSD1306 import SSD1306
if you use different pins then you will need to specify these in the inital call
d = PCD8544()
d.poweron()
d.init_display() # displays the Project Pages logo
d.clear() # clears the display buffer
d.display() # writes the buffer to the actual display
d._row is the character row
d._col is the character column
d.p_char('x')
* puts the character into the display buffer
* advances _row and _col accordingly. They will wrap back to the top of the screen
* requires d.display() to show itd.p_string('hello world')
* prints the string to the display buffer
* advances _row and _col accoridngly. They will wrap back to the top of the screen
* requires d.display() to show itd.pixel(x,y,fill)
* sets a pixel in the display buffer
* this is for use by the lcd_gfx.py
* this allows you to draw lines, rectangles, triangles and circles. Filled or notI have added a **main.py** that demonstrates the string printing and drawing capabilities