ESP32 + ls013b4dn04 2.7" Sharp Memory Display #921
-
After going through wiring up some buttons and writing a bit of code I ordered the 2.7" Sharp Memory Display - Adafruit Sharp Memory Display. I have a few ESP32 boards, but for this I'm using the There are examples for the manifest.json: {
"include" : [
"$(MODDABLE)/examples/manifest_base.json",
"$(MODULES)/drivers/ls013b4dn04/manifest.json",
"$(MODULES)/base/instrumentation/manifest.json"
],
"config": {
"screen": "ls013b4dn04",
"touch": "",
"format": "Gray256"
},
"resources": {
"*": [
"./moddable-white"
]
},
"defines": {
"ls013b4dn04": {
"width": 400,
"height": 240,
"hz": 3500000,
"cs_pin": 4,
"spi_port": 23
}
},
"modules": {
"commodetto/Poco": "$(COMMODETTO)/commodettoPoco",
"commodetto/*": "$(COMMODETTO)/commodettoPocoBlit",
"commodetto/parseBMF": "$(COMMODETTO)/commodettoParseBMF",
"commodetto/parseBMP": "$(COMMODETTO)/commodettoParseBMP",
"commodetto/Bitmap": "$(COMMODETTO)/commodettoBitmap",
"Resource": "$(MODDABLE)/modules/files/resource/Resource",
"*": "./main"
},
"preload": [
"commodetto/*",
"Resource",
"instrumentation",
"pins",
"spi",
"main"
]
} main.js: import LS013B4DN04 from "ls013b4dn04";
import Poco from "commodetto/Poco";
import Resource from "Resource";
import parseBMP from "commodetto/parseBMP";
import Timer from "timer";
debugger;
const TIMER_MS = 5000;
export default function() {
// Took this example from the moddable example for ls013b4dn04 (removing sleep)
const logo = parseBMP(new Resource("moddable-white.bmp"));
const width = 400, height = 240;
let render = new Poco(new LS013B4DN04({ width: width, height: height }));
let black = render.makeColor(0, 0, 0);
let white = render.makeColor(255, 255, 255);
let index = 0;
let timer = Timer.repeat(() => {
index ^= 1;
render.begin(0, 0, width, height);
render.fillRectangle(index ? white : black, 0, 0, width, height);
render.drawGray(logo, index ? black : white, 0, 30);
render.end();
}, TIMER_MS);
} Run:
Error in the terminal:
Click to view the full output...
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 16 replies
-
The Commodetto Font Engine (CFE) isn't being included, which is causing a link error The easiest way to resolve that is to include {
"include" : [
"$(MODDABLE)/examples/manifest_base.json",
"$(MODDABLE)/examples/manifest_commodetto.json",
"$(MODULES)/drivers/ls013b4dn04/manifest.json"
],
"config": {
"screen": "ls013b4dn04",
"touch": "",
"format": "Gray256"
},
"resources": {
"*": [
"./moddable-white"
]
},
"defines": {
"ls013b4dn04": {
"width": 96,
"height": 96,
"hz": 3500000
}
},
"modules": {
"Resource": "$(MODDABLE)/modules/files/resource/Resource",
"*": "./main"
},
"preload": [
"Resource",
"main"
],
"strip":"*"
} |
Beta Was this translation helpful? Give feedback.
-
Too bad. The super slo-mo is nice though. I'm out of ideas. You should at least be able to move your workaround out of script and into the driver. At the end of the native constructor, SCREEN_CS_ACTIVE; The call to |
Beta Was this translation helpful? Give feedback.
The Commodetto Font Engine (CFE) isn't being included, which is causing a link error The easiest way to resolve that is to include
manifest_commodetto.json
. Here's a revisited manifest that builds for ESP8266 (and should work for ESP32 as well).