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

Astranome
Posts: 2
Joined: Sun Jul 12, 2020 12:46 pm

Re: Redirecting terminal/WebRepl to OLED 1306

Post by Astranome » Sun Jul 12, 2020 5:26 pm

Is possible to add keyboard ? I would really like to make " true stand alone" python terminal :D

User avatar
Roberthh
Posts: 2147
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Redirecting terminal/WebRepl to OLED 1306

Post by Roberthh » Sun Jul 12, 2020 7:50 pm

One of the aspects is to find keyboard which can be attached using a serial interface. ASCII keyboards are gone. But some people made alternatives, besides USB to serial adapters (e.g. https://www.adafruit.com/product/1136), like:
https://www.hackster.io/news/this-seria ... 89d5b21370

Astranome
Posts: 2
Joined: Sun Jul 12, 2020 12:46 pm

Re: Redirecting terminal/WebRepl to OLED 1306

Post by Astranome » Fri Jul 17, 2020 2:05 am

What about PS/2 Keyboard?

felis_catus
Posts: 1
Joined: Sat Jul 18, 2020 1:19 pm

Re: Redirecting terminal/WebRepl to OLED 1306

Post by felis_catus » Sat Jul 18, 2020 1:32 pm

I've built up a SnapOnAir board which functions as a keyboard and display for a Raspberry Pi, it uses an ILI9341 based display and a TCA8418 I2C keyboard encoder. I would like to get it working as a standalone Micropython unit. I guess it would involve code which processes the keypress events and provides the readinto function that the dupterm documentation mentions. Having said that I currently have no idea how to do it.
Edit: you could use a TCA8418 to repurpose a laptop keyboard, I've got some spare IC's, and DIL adapter boards on order, so I may well have a play with some hardware.

Post Reply