Redirecting terminal/WebRepl to OLED 1306

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
User avatar
boochow
Posts: 28
Joined: Sat Dec 16, 2017 9:36 am

Re: Redirecting terminal/WebRepl to OLED 1306

Post by boochow » Sun Nov 11, 2018 3:14 am

HermannSW wrote:
Sun Oct 07, 2018 8:45 am
Your current version is much better than the one I used before, editing REPL history commands works fine if not changing leftmost character.
I fixed the issue by adding two escape sequences support.

I also gave this tool its own repository:
https://github.com/boochow/FBConsole

HermannSW
Posts: 144
Joined: Wed Nov 01, 2017 7:46 am
Contact:

Re: Redirecting terminal/WebRepl to OLED 1306

Post by HermannSW » Sun Dec 02, 2018 7:46 pm

Thank you!

I tested your new repo, verified that it fixed the issue.
Tried many things to find issues, but found none ;-)

I terminated my repo pointing to your new dedicated FBConsole repo:
https://github.com/Hermann-SW/micropyth ... -statement

And I added your FBConsole to MicroPython Wiki:
http://wiki.micropython.org/Home#Graphical-Displays

User avatar
boochow
Posts: 28
Joined: Sat Dec 16, 2017 9:36 am

Re: Redirecting terminal/WebRepl to OLED 1306

Post by boochow » Mon Dec 03, 2018 1:48 am

Thank you for testing and updating the wiki !

vitalis
Posts: 8
Joined: Fri Nov 29, 2019 6:04 am
Location: Finland

Re: Redirecting terminal/WebRepl to OLED 1306

Post by vitalis » Mon Dec 02, 2019 9:34 pm

Hi,
is it possible to add REPL redirect to ILI934X TFT displays?

Is it necessary to have display which has hardware scrolling?

User avatar
boochow
Posts: 28
Joined: Sat Dec 16, 2017 9:36 am

Re: Redirecting terminal/WebRepl to OLED 1306

Post by boochow » Sat Dec 14, 2019 10:56 am

Hi vitalis,
is it possible to add REPL redirect to ILI934X TFT displays?
It seems to be possible.
FBConsole requires a display to have following APIs:

Code: Select all

fill(self, color)
fill_rect(self, x, y, w, h, color)
scroll(self, dx, dy)
hline(self, x, y, w, color)
text(self, c, x, y, color)
and the driver you mentioned (ili934xnew.py) has:

Code: Select all

fill_rectangle(self, x, y, w, h, color=None)
scroll(self, dy)
chars(self, str, x, y)
set_color(self,fg,bg)
So, you need to write a wrapper class to provide API for FBConsole and it seems not that difficult.
fill() and hline() can be easily implemented using fill_rectangle.
text() can call set_color() and chars().
To implement scroll(self, dx, dy), use scroll(self, dy) and ignore dx. It works because dx is always zero.

I wrote a wrapper class for ST7735 the other day and it works fine.
https://github.com/boochow/FBConsole/bl ... T7735fb.py
Is it necessary to have display which has hardware scrolling?
Not mandatory. It is simply a matter of display speed.

vitalis
Posts: 8
Joined: Fri Nov 29, 2019 6:04 am
Location: Finland

Re: Redirecting terminal/WebRepl to OLED 1306

Post by vitalis » Sat Dec 14, 2019 7:27 pm

Thank you! I will try to write such wrapper.
Meanwhile I Am trying to do REPL redirecting to one of those extra-cheap 20x4 LCD with I2C controller.

Just to dream - maybe it will be good to have a native support for common displays from Micropython itself... Performance wise should be much faster

Post Reply