Sharp Memory LCDs are high pixel density, low power displays that don't need backlights. They draw in the region of 100uA while idle, so are perfect for always-on, battery-powered applications.
Display | Espruino | Function |
---|---|---|
GND | GND | GND |
Vin | 3.3 | Power In (Supposedly the 2.7" LCD needs 5v, but it appears to work off 3.3v) |
SCLK | B3 | SPI SCK |
SI | B5 | SPI MOSI |
SCS | B4 | Chip Select (active high) |
EXTCOMIN | B6 | VCOM (refresh) |
DISP | 3.3 | Display Enable (active high) |
EXTMODE | 3.3 | On the breakout boards this is normally not connected to anything, and instead a jumper on the board should be set to 'H' |
Just use the MemoryLCD (About Modules) module as follows:
SPI1.setup({ sck:B3, mosi:B5, order: "lsb", baud: 4000000 });
var g = require("MemoryLCD").connect(SPI1, B4/*SCS*/, B6/*EXTCOMIN*/, 128/*width*/, 128/*height*/, function() {
g.clear();
g.drawString("Hello",0,0);
g.drawLine(0,10,g.getWidth(),10);
g.drawString(getTime(), 0, 20);
g.flip();
});
More details on how to draw are in Graphics.
order : 'lsb'
(the default is 'msb'), and the baud rate shouldn't be above 4000000The LCDs come with a ~0.5mm ribbon on them so they're hard to connect to directly and you'll probably need a breakout board.
Sellers of LCDs on breakout boards are:
This page is auto-generated from GitHub. If you see any mistakes or have suggestions, please let us know.