Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/forester3/micropython-lcd-AQM1248A
https://github.com/forester3/micropython-lcd-AQM1248A
Last synced: about 16 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/forester3/micropython-lcd-AQM1248A
- Owner: forester3
- License: mit
- Created: 2017-11-25T13:21:03.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-07-11T23:59:04.000Z (over 6 years ago)
- Last Synced: 2024-04-22T12:34:09.429Z (7 months ago)
- Language: Python
- Size: 12.7 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-micropython - micropython-lcd-AQM1248A - ESP8266 driver for AQM1248A graphic LCD. (Libraries / Display)
- awesome-mpython - micropython-lcd-AQM1248A - ESP8266 driver for AQM1248A graphic LCD. (精选驱动库 / 显示类)
README
# micropython-lcd-AQM1248A
A character display class for controlling the mini graphic LCD AQM1248A with the micropython esp8266.There are one external dependences, it is **"machine"** class.
## New module aqm1248largechrlcd
Displayed large font size is 15x21.
### Usage
~~~
import machine
import aqm1248largechrlcd
hspi = machine.SPI(1)
lcd = aqm1248largechrlcd.LargeChrLcd( hspi, cs_pin=2, rs_pin=15 )
lcd.clear()
lcd.write( 'Micro\n' )
lcd.write( 'Python' )
~~~
## Second module aqm1248midchrlcdDisplayed medium font size is 10x14.
### Usage
~~~
import machine
import aqm1248midchrlcd
hspi = machine.SPI(1)
lcd = aqm1248midchrlcd.MidChrLcd( hspi, cs_pin=2, rs_pin=15 )
lcd.clear()
lcd.write( 'Hello, AQM1248A !' )
lcd.text('Micro', 12, 2)
~~~
In text() method, the page number is only even number.
(column = 12, page =2) means to display a medium size font on the 2nd column of the 2nd line.## First module aqm1248chrlcd
### Usageuse hardware SPI
~~~
import machine
hspi = machine.SPI(1)
import aqm1248chrlcd
lcd = aqm1248chrlcd.ChrLcd( hspi, cs_pin=2, rs_pin=15 )
lcd.clear()
lcd.write( 'Hello, AQM1248A !' )
~~~
use software SPI
~~~
import machine
sspi = machine.SPI(-1, sck=machine.Pin(14), mosi=machine.Pin(13), miso=machine.Pin(12) )
import aqm1248chrlcd
lcd = aqm1248chrlcd.ChrLcd( sspi, cs_pin=2, rs_pin=15 )
lcd.clear()
lcd.text( 'Hello, World !!', 3, 3 )
~~~
### usage of text() method
The second argument is column, the range is from 0 to 128.
The third argument is page, the range is form 0 to 5.