mastodon.ie is one of the many independent Mastodon servers you can use to participate in the fediverse.
Irish Mastodon - run from Ireland, we welcome all who respect the community rules and members.

Administered by:

Server stats:

1.6K
active users

#micropython

12 posts11 participants2 posts today

#Computerclub2

#CC2tv #403 Vom `print()` zum #Bit

So spricht dein #Mikrocontroller
Wir zeigen, wie ein einziger #MicroPython-Befehl – `print("Hallo Welt")` – Schicht für Schicht bis zum elektrischen Signal am TX-Pin zerlegt wird. Wir starten in der Hochsprache, werfen einen Blick auf den erzeugten #Bytecode und zeigen, wie die MicroPython-VM ihn in C-Routinen übersetzt. Von dort gelangt der String über den #UART-Treiber als #ARM- #Maschinencode auf den RP2040-Prozessor

cc2.tv/daten/20250705100000.ph

cc2.tvCC2.tv: Computerclub 2
Replied to Xavi

@xavi
You will always need bus and display drivers for this; either loaded as part of your project, or a #MicroPython firmware with a drivers built-in.

#QSPI is 'Quad SPI', a very fast display bus. The #ESP32 micropython port does not support this natively, so you need a driver for that.
It may get added in the future, See discussion here, etc:
github.com/orgs/micropython/di

You also need a driver for the SH8601 itself (this will use the QSPI bus).

Have a look at this page; which has a pre-compiled, non-lvgl firmware supporting your board + display.
github.com/dobodu/Lilygo-Amole

Personally; I think you want to go the #LVGL route anyway; It's more of an ecosystem than just a set of display drivers. You get the tools and libraries to use the display effectively, as well as the hardware support.

Micropython itself does not build in any drivers or features for this sort of display. It has basic framebuffer support but this is intended for tiny OLED's etc. Not large color displays. Indeed, a framebuffer for this display would be 688K in size.. larger than the system RAM.

Is there anyone in the room with knowledge about #ESP32 microcontrollers?

I am playing with a #Waveshare development board that has an #AMOLED and a touchscreen, and it says it has built-in #SH8601 display driver and #FT3168 capacitive touch chip, using #QSPI and #I2C communication respectively.

waveshare.com/product/arduino/

It directly works in #Arduino with #C, but I am trying to make it work with #MicroPython.

Before I spend effort trying to compile it with #LVGL, I want to know if I could print a "Hello World" to the screen as is, and while my mind tells me that I need a driver, the sentence "built-in display driver using QSPI" makes me think that I could eventually use the display without code drivers, but I don't know how.

I'd love to see an example, if it's possible, or to be pointed to any resources that I can read in this regard. I am complete newbie.

Re-posts are appreciated.

Thank in advance 😊

www.waveshare.comESP32-S3 1.8inch AMOLED Touch Display Development Board, 32-bit LX7 Dual-core Processor, 368×448 Pixels, Accelerometer And Gyroscope Sensor, ESP32 With Display | ESP32-S3-Touch-AMOLED-1.8ESP32-S3 1.8inch AMOLED Touch Display Development Board, 32-bit LX7 Dual-core Processor, 368×448 Pixels, Accelerometer And Gyroscope Sensor, ESP32 With Display | ESP32-S3-Touch-AMOLED-1.8
Replied in thread

Are there any folks with vintage Mac programming experience who'd like to collaborate on figuring out what's next with Micropython on Mac?

I think that might be: What's the minimal set of APIs to do a fun graphical demo.

Pointers to "how to"-ish documentation in Pascal and C would be great as well, I have failed at finding this kind of stuff. (I do have Inside Macintosh but it is not a great tutorial)

#micropython
#python
#retrocomputing
#retro68
#macintosh
#m68k

Replied in thread

oh my yay, it now works well enough to save and edit a file, then import and run that file.

you could basically use an old m68k mac as a python3 (well, micropython) development system now.

don't mind the debug messages, they're as scared of you as you are of them.

Replied in thread

Whee! Now we can import files from the filesystem, as well as reading and writing files. Still haven't wrapped my head around how folders work, still can't enumerate files ..

as usual, work pushed to my micropython fork on github (which is called circuitpython, because you can't have two different forks of the "same" original project, argh).

Continued thread

Darn, I think all the easy parts of the micropython mac m68k port are done.

unfortunately, vfs_posix doesn't seem to be a good fit. I did manage to create a "file" but couldn't actually write data to it.

And while it was working in system6 I just tried it again with system7 and it's failing to start at all. boo.

github.com/jepler/circuitpytho

A Practical #Pimoroni #Presto #Project for media display/control.

I've been working on the code some more and have now got a working Skip button!

Since I turn the backlight off when paused I have also added the option to touch the screen to resume.

and some refactoring has been carried out to make the code a little nicer to look at and tweak later.

It's also more responsive to touch for Pause and Skip.

I will keep testing this whilst I am at work tomorrow and over the weekend.

Hopefully a new blog post next week with the updates.

Continued thread

Build updated at emergent.unpythonic.net/files/

Almost all of the "full features" support level of micropython are enabled, "mpz" for long integers and "float" for floating point numbers.

Backspace works in the repl. arrow keys don't.

A TODO section in the new README lists key items to work on:

  • Correctly implement GC collection (stack + registers)
  • Add Mac API support (e.g., quickdraw, arbitrary traps)
  • Support larger heap
  • Address GPL files (RetroConsole), GitHub Actions CI, and other issues that might prevent upstream inclusion.

Had my first encounter with a Raspberry Pi Pico today.

I needed a MCU that could enumerate two USB serial ports to a host, have a UART interface for an external device, and control a heap of GPIOs. The RPi Pico was a little light on GPIOs, but add a couple of I²C expanders, and we were in business. The idea was one USB serial interface (call it port 1) would be for control commands, and serial traffic on the other (port 2).

The UART on the thing is hooked up to a multiplexing circuit with two RS-485 transceivers and a TTL buffer, so via port 1, I can put port 2 into any of: TTL serial, RS-485 (via either transceiver), or RS-422 (both transceivers, using one for receive and the other for transmit). The GPIOs sense things through optical isolators and tickle devices via reed relays.

Haven't wired the thing up yet, but TinyUSB has a dual CDC-ACM example that was a doddle to get going on the Pico… so I don't expect it to be a big job.

Not sure if this can be done in #MicroPython … I think I'll be using C, but that's fine, C will get the job done.

Tomorrow should be interesting.