Replies: 1 comment 4 replies
-
|
That's great! Glad you got it going! You may well be able to build your own firmware using SPILCD that's inside Espruino: https://github.com/espruino/Espruino/blob/master/libs/graphics/lcd_spilcd.c (or lcd_spi_unbuf) - that should be a lot faster. For the keyboard, I'm not sure if https://www.espruino.com/KeyPad will work? It uses watches on the matrix lines which means it doesn't have to keep polling - it knows when a key is pressed. But I don't know if ESP32 can do enough watches |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Thanks to recent improvements to the ESP32 build by @SimonGAndrews, Espruino now runs on my Cardputer!
To me, the Cardputer is the ideal Espruino device. It has Wifi, BLE, 1.14" display, keyboard, speaker, mic, microSD slot, battery and a Grove port for peripherals. Mine is the older version. The improved Cardputer ADV has a more responsive I2C keyboard, 14 GPIO pins on the back and a better antenna.
My goal is to make the Cardputer into a portable Espruino microcomputer. With the microSD card slot, it can carry all the modules and "apps" I need. The dream would be to have a command-line OS with the ability to edit files and launch apps, making it a full-fledged personal computer.
To keep myself on the ground, however, I think a simple Espruino console will have to do for now.
So far, I've gotten it to work as a VT100 terminal. The display was easy, as it was already supported by the ST7789 module. I then added rudimentary support for the 4x14 keyboard matrix and used the VT100 module to get a terminal on the display.
Code
Video
Sorry for the unsteady camera…
It works, which is really cool! But it is also very slow and a bit buggy. First, the ST7789 module is not native but runs in the JavaScript interpreter. Second, my older Cardputer uses a demultiplexer for the keyboard matrix which requires checking which keys are pressed every few ms, no interrupts. So the keys require long/hard presses to register, after which the display takes a moment to update, making it all feel very sluggish. And for some reason, it doesn't scroll.
I'm now thinking a better approach would be a custom Espruino build. Use M5Stack's M5Cardputer library, with M5GFX (based on LovyanGFX) instead of the ST7789 module for the display, and provide a JS API for the keyboard and other peripherals. And like the Pixl, provide a built-in
Terminal. That is a much larger undertaking.I've not done a ton of C and have only just looked around in the Espruino code base, so I'm not sure if I can pull it off on my own. But there's only one way to find out, so I think I will give it a try. If anybody is interested in helping out, you'll be more than welcome!
https://github.com/joakim/Espruino-Cardputer
Beta Was this translation helpful? Give feedback.
All reactions