PineTime display and micropython
#1
Just wondered if anyone has got the display going from MicroPython.

So far I've spent most of my time on PineTime hacking together a bootloader robust enough to allow me to stick the back on (albeit with something I could undo in an emergency). Nothing too fancy... just getting the bootloader and app cooperate to turn the user button into a watchdog enforced long press reset button.

I've been using MicroPython with a BLE REPL as a test payload and the next step is to get something on the display so I just wondered if someone is ahead of me there and already has this going in Python? Once the back is on I'd like to at least see the time!
PineTime: wasp-os and MicroPython, Pinebook Pro:  Debian Bullseye
  Reply
#2
This looks great, I had no idea we could use Python for this kind of project.
I'll certainly start tinkering with this as soon as I have the time.
I'd love to see any examples of your work you may have.
  Reply
#3
(01-19-2020, 04:11 AM)danielt Wrote: Just wondered if anyone has got the display going from MicroPython.

So far I've spent most of my time on PineTime hacking together a bootloader robust enough to allow me to stick the back on (albeit with something I could undo in an emergency). Nothing too fancy... just getting the bootloader and app cooperate to turn the user button into a watchdog enforced long press reset button.

I've been using MicroPython with a BLE REPL as a test payload and the next step is to get something on the display so I just wondered if someone is ahead of me there and already has this going in Python? Once the back is on I'd like to at least see the time!

Hi Danielt,

I found this project https://github.com/devbis/st7789_mpy
but not tested for the moment since I would like to have a bootloader to test before.

Could you please provide your bootloader to test ?

I also found some information from Hynitrion about the touch screen, please see in this Zip file : https://wiki.pine64.org/images/2/2f/CST816S.zip

If I have a way to test I think I could help you.

BR,
Memiks
  Reply
#4
(01-19-2020, 06:05 PM)Memiks Wrote:
(01-19-2020, 04:11 AM)danielt Wrote: Just wondered if anyone has got the display going from MicroPython.

So far I've spent most of my time on PineTime hacking together a bootloader robust enough to allow me to stick the back on (albeit with something I could undo in an emergency). Nothing too fancy... just getting the bootloader and app cooperate to turn the user button into a watchdog enforced long press reset button.

I've been using MicroPython with a BLE REPL as a test payload and the next step is to get something on the display so I just wondered if someone is ahead of me there and already has this going in Python? Once the back is on I'd like to at least see the time!

I found this project https://github.com/devbis/st7789_mpy
but not tested for the moment since I would like to have a bootloader to test before.

Could you please provide your bootloader to test ?

My work to date can be found at https://github.com/daniel-thompson/wasp-os (the bootloader and micropython are both submodules which you can look at independently if you prefer). Having said that there's no documentation at this point... I'm still focused on getting the time to display (given this the device is a watch and all that).
PineTime: wasp-os and MicroPython, Pinebook Pro:  Debian Bullseye
  Reply
#5
(01-20-2020, 03:49 AM)danielt Wrote:
(01-19-2020, 06:05 PM)Memiks Wrote:
(01-19-2020, 04:11 AM)danielt Wrote: Just wondered if anyone has got the display going from MicroPython.

So far I've spent most of my time on PineTime hacking together a bootloader robust enough to allow me to stick the back on (albeit with something I could undo in an emergency). Nothing too fancy... just getting the bootloader and app cooperate to turn the user button into a watchdog enforced long press reset button.

I've been using MicroPython with a BLE REPL as a test payload and the next step is to get something on the display so I just wondered if someone is ahead of me there and already has this going in Python? Once the back is on I'd like to at least see the time!

I found this project https://github.com/devbis/st7789_mpy
but not tested for the moment since I would like to have a bootloader to test before.

Could you please provide your bootloader to test ?

My work to date can be found at https://github.com/daniel-thompson/wasp-os (the bootloader and micropython are both submodules which you can look at independently if you prefer). Having said that there's no documentation at this point... I'm still focused on getting the time to display (given this the device is a watch and all that).

Thank you for sharing this. Knowing some python I think this will be a good route for me to take.
  Reply
#6
YES ! really thank you for this.

It will be the first step for me to develop to the pinetime Wink.

I check that and give you feedback soon !

Thanks.
  Reply
#7
PineTime's touchscreen controller is so interesting that I wrote a whole article about it :-)

Building a Rust Driver for PineTime’s Touch Controller
  Reply
#8
(01-20-2020, 06:41 PM)Memiks Wrote: YES ! really thank you for this.

It will be the first step for me to develop to the pinetime Wink.

I check that and give you feedback soon !

Thanks.

Great. It will be interesting to compare notes. I have started experimenting with porting the pure-Python RPi ST7789 driver from pimoroni but it hasn't sprung into life yet.

(01-20-2020, 09:26 PM)lupyuen Wrote: PineTime's touchscreen controller is so interesting that I wrote a whole article about it :-)

Building a Rust Driver for PineTime’s Touch Controller

Cool. I've been enjoying your articles.
PineTime: wasp-os and MicroPython, Pinebook Pro:  Debian Bullseye
  Reply
#9
Just checked in a proof-of-conept display driver based on the adafruit+pimoroni one. Nothing fancy at this point but we can do basic line by line stuff:

Code:
import pinetime
tft = pinetime.st7789()
tft.set_window()
for i in range(240):
    tft.data([0xf8, 0x00] * 240)

I might just spend a little while at this point seeing if I can draw the pine logo.
Drawing the pine logo from C with the least possible code size is about to a side challenge to see if we can give the bootloader a splash screen...
PineTime: wasp-os and MicroPython, Pinebook Pro:  Debian Bullseye
  Reply
#10
Would it be possible for you to give us a brief Would it be possible for me to flash this to a Pinetime via a Raspberry Pi?
I'm very eager to get started with learning this, and just need a bit of guidance on how to start with Wasp-Os
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Update bootlogo and pinetime-app with OTA/DFU lookin 3 175 11-25-2020, 04:51 PM
Last Post: lookin
Heart wasp-os: MicroPython for PineTime! danielt 84 22,511 11-22-2020, 11:55 AM
Last Post: danielt
  PineTime Simulation Feature gjoyet 3 215 11-15-2020, 11:42 AM
Last Post: gjoyet
  Star Trek computer themed wasp-os on PineTime graynada 11 1,797 10-30-2020, 01:00 PM
Last Post: graynada
  Pinetime and P8 Integration testing framework maiden 7 979 10-23-2020, 03:25 PM
Last Post: maiden
  Article: Create Your Own PineTime Watch Face in Rust... And Publish on crates.io lupyuen 2 435 10-18-2020, 09:24 PM
Last Post: lupyuen
  Article: Bluetooth Time Sync and LVGL on PineTime Mynewt lupyuen 0 253 10-15-2020, 05:51 PM
Last Post: lupyuen
  Remote PineTime for flashing and testing firmware remotely lupyuen 5 639 10-06-2020, 12:03 AM
Last Post: lupyuen
  Rust on PineTime at RIOT Summit lupyuen 3 870 09-25-2020, 05:05 PM
Last Post: lupyuen
  Article: Preview PineTime Watch Faces in your Web Browser with WebAssembly lupyuen 1 580 09-13-2020, 02:09 PM
Last Post: VMMainFrame

Forum Jump:


Users browsing this thread: 1 Guest(s)