Fade 1 image to show another.

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
AJB2K3
Posts: 44
Joined: Wed Mar 06, 2019 5:20 pm

Fade 1 image to show another.

Post by AJB2K3 » Wed Apr 14, 2021 5:32 am

Hi, I planning a project that has two grayscale images placed one over the other.
Is there a way in micropython to have the top image fade from full visibility to 0 visibility making the bottom visable?
Or even only fade the pixels that are different colours?

User avatar
pythoncoder
Posts: 5145
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Fade 1 image to show another.

Post by pythoncoder » Wed Apr 14, 2021 9:25 am

You might be more likely to get a response if you told us what hardware you plan to use: display type and host device.
Peter Hinch

AJB2K3
Posts: 44
Joined: Wed Mar 06, 2019 5:20 pm

Re: Fade 1 image to show another.

Post by AJB2K3 » Wed Apr 14, 2021 3:40 pm

sorry, I was planning to use a GC9A01 round screen with esp32 D0DQ6 esp32 pico d4 and RP2040.

User avatar
pythoncoder
Posts: 5145
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

GC9A01 display driver

Post by pythoncoder » Thu Apr 15, 2021 7:46 am

OK, so the question is whether anyone has written a MicroPython driver for the GC9A01 display. I'm not aware of one, and a forum search draws a blank. You may have to DIY. This usually involves porting Arduino C code to MicroPython, a task that requires familiarity with low level coding in both languages and being comfortable reading device datasheets.
Peter Hinch

AJB2K3
Posts: 44
Joined: Wed Mar 06, 2019 5:20 pm

Re: GC9A01 display driver

Post by AJB2K3 » Thu Apr 15, 2021 3:39 pm

pythoncoder wrote:
Thu Apr 15, 2021 7:46 am
OK, so the question is whether anyone has written a MicroPython driver for the GC9A01 display. I'm not aware of one, and a forum search draws a blank. You may have to DIY. This usually involves porting Arduino C code to MicroPython, a task that requires familiarity with low level coding in both languages and being comfortable reading device datasheets.
That is going to be the hard part but I was wondering if there was a generic graphical routine for the fade effect.
I have an idea on how to do it but it will be slow and memory intensive.

scruss
Posts: 69
Joined: Sat Aug 12, 2017 2:27 pm

Re: GC9A01 display driver

Post by scruss » Thu Apr 15, 2021 3:46 pm

pythoncoder wrote:
Thu Apr 15, 2021 7:46 am
OK, so the question is whether anyone has written a MicroPython driver for the GC9A01 display.
There isn't one, but there is for CircuitPython. Tod Kurt (@todbot) suggested it's very similar to other displays, except it has a custom init code: https://github.com/tylercrumpton/Circui ... /gc9a01.py

AJB2K3
Posts: 44
Joined: Wed Mar 06, 2019 5:20 pm

Re: GC9A01 display driver

Post by AJB2K3 » Thu Apr 15, 2021 5:36 pm

scruss wrote:
Thu Apr 15, 2021 3:46 pm
pythoncoder wrote:
Thu Apr 15, 2021 7:46 am
OK, so the question is whether anyone has written a MicroPython driver for the GC9A01 display.
There isn't one, but there is for CircuitPython. Tod Kurt (@todbot) suggested it's very similar to other displays, except it has a custom init code: https://github.com/tylercrumpton/Circui ... /gc9a01.py
Todbot?
And here I thought he was an actual bot!
Thanks for the link!

User avatar
russ_h
Posts: 52
Joined: Thu Oct 03, 2019 2:26 am

Re: Fade 1 image to show another.

Post by russ_h » Thu Apr 22, 2021 8:21 pm

I'm working on a driver for the GC9A01 display. The driver is working with this display on a Raspberry Pi PICO. After a little more testing I'll try it with the ESP32. I should have something up on GitHub this weekend.
IMG_4225.jpg
IMG_4225.jpg (32.07 KiB) Viewed 557 times

User avatar
pythoncoder
Posts: 5145
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Fade 1 image to show another.

Post by pythoncoder » Fri Apr 23, 2021 5:55 am

I love that watch display with all its detail - even shadows under the hands. I know just how much work it takes to produce a display as pretty as that.
Peter Hinch

User avatar
russ_h
Posts: 52
Joined: Thu Oct 03, 2019 2:26 am

Re: Fade 1 image to show another.

Post by russ_h » Fri Apr 23, 2021 2:57 pm

Pictures don’t do it justice, it looks even better in person.
9CC2A3EF-A5F3-420C-AEC2-371883B9A78C.jpeg
9CC2A3EF-A5F3-420C-AEC2-371883B9A78C.jpeg (81.54 KiB) Viewed 525 times

Post Reply