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
Heart wasp-os: MicroPython for PineTime! danielt 24 2,133 Today, 02:37 AM
Last Post: danielt
  Article: Wireless Firmware Update In Action on PineTime lupyuen 0 41 05-20-2020, 06:03 AM
Last Post: lupyuen
  MCUBoot Bootloader for PineTime lupyuen 2 285 05-18-2020, 04:23 PM
Last Post: lupyuen
  Simplified boot flasher for PineTime via PI jlukanc 0 35 05-15-2020, 04:38 PM
Last Post: jlukanc
  PineTime Hypnos endian-albin 0 91 05-10-2020, 02:28 AM
Last Post: endian-albin
  CHIP-8 Retro Game Emulator for PineTime lupyuen 7 497 04-15-2020, 12:19 PM
Last Post: seclorum
  wasp-bootloader: a robust SoftDevice bootloader for PineTime danielt 3 508 04-14-2020, 05:31 AM
Last Post: danielt
  Pinetime backlight current. TT-392 2 231 03-11-2020, 09:57 AM
Last Post: TT-392
  Create PineTime Watch Apps with Visual Rust lupyuen 0 170 02-19-2020, 02:50 AM
Last Post: lupyuen
  Live Debug of RIOT-OS on PineTime lupyuen 3 289 02-11-2020, 06:33 AM
Last Post: wibble

Forum Jump:


Users browsing this thread: 1 Guest(s)