Comments (3)
@mmoskal I see you wrote some of that c code that runs the image render, any insights here (sorry for the direct ping)
I did a deep dive to see if there was anything I could do in userland but I think my configuration good, the image context from allocate doesn't allow me to fix this AFAIK.
from jacscript.
You want to make sure you initialize the screen correctly. Eg code for 1.14inch picolcd is this:
const d = new ST7789Driver(Image.alloc(240, 136, 4), {
dc: pins.GP8,
cs: pins.GP9,
reset: pins.GP12,
// frmctr1: 0x0e_14_ff,
flip: false,
spi: spi,
offX: 40,
offY: 53,
})
await d.init()
You need to make sure you have similar code that matches what's in the vendor's C libraries. Also they say the display is 135px tall, but it's probably 136px; if not that may be a problem
from jacscript.
I can render background colors, circles and squares just fine. The only issue is images. I was thinking because if this it wouldn't be my configuration.
Here's my config, looks the same.
spi.configure({
mosi: gpio(35),
sck: gpio(36),
hz: 8_000_000,
})
// backlight led
gpio(38).setMode(GPIOMode.OutputHigh)
const width = 240
const height = 136
const display = new ST7789Driver(Image.alloc(width, height, 4), {
dc: gpio(34),
cs: gpio(37),
reset: gpio(33),
// frmctr1: 0x0e_14_ff,
flip: false,
spi: spi,
offX: 40,
offY: 53,
})
from jacscript.
Related Issues (20)
- in codespace, connect url uses wrong port
- start dev server lazily
- only show icon in status bar when inactive
- M5Stack support HOT 3
- No DeviceScript Managers found HOT 28
- name of new project is "./"
- > The startAccelerometer returns a client that is already bound to your server so you don't need the "const a .... " line. You can simply remove it. HOT 3
- Error: spawn wmic ENOENT windows 11 HOT 1
- "error can't alloc pcb" occurs when calling fetch API. HOT 1
- TLS support on RP2040! HOT 1
- RGB Pins occupied by PSRAM HOT 2
- fetch is not defined HOT 4
- Device firmware is outdated, but no newer firmware is available HOT 3
- ESP32-S3 possibly incorrect flash pins (M5Stack Cardputer) HOT 11
- Unfinished javascript spec HOT 1
- Cardputer Keyboard? HOT 7
- Command failed with exit code 100
- DeviceScript wrongly considers a loop as an infinite one.
- Do not have "flash device" menu item. Getting started section is rather poor for newcomers.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jacscript.