Page 3 of 4

Re: Redirecting terminal/WebRepl to OLED 1306

Posted: Sun Nov 11, 2018 3:14 am
by boochow
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

Re: Redirecting terminal/WebRepl to OLED 1306

Posted: Sun Dec 02, 2018 7:46 pm
by HermannSW
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

Re: Redirecting terminal/WebRepl to OLED 1306

Posted: Mon Dec 03, 2018 1:48 am
by boochow
Thank you for testing and updating the wiki !

Re: Redirecting terminal/WebRepl to OLED 1306

Posted: Mon Dec 02, 2019 9:34 pm
by vitalis
Hi,
is it possible to add REPL redirect to ILI934X TFT displays?

Is it necessary to have display which has hardware scrolling?

Re: Redirecting terminal/WebRepl to OLED 1306

Posted: Sat Dec 14, 2019 10:56 am
by boochow
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.

Re: Redirecting terminal/WebRepl to OLED 1306

Posted: Sat Dec 14, 2019 7:27 pm
by vitalis
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

Re: Redirecting terminal/WebRepl to OLED 1306

Posted: Sun Jul 12, 2020 5:26 pm
by Astranome
Is possible to add keyboard ? I would really like to make " true stand alone" python terminal :D

Re: Redirecting terminal/WebRepl to OLED 1306

Posted: Sun Jul 12, 2020 7:50 pm
by Roberthh
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

Re: Redirecting terminal/WebRepl to OLED 1306

Posted: Fri Jul 17, 2020 2:05 am
by Astranome
What about PS/2 Keyboard?

Re: Redirecting terminal/WebRepl to OLED 1306

Posted: Sat Jul 18, 2020 1:32 pm
by felis_catus
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.