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
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Redirecting terminal/WebRepl to OLED 1306

Post by pythoncoder » Fri Oct 05, 2018 9:18 am

It supports fill_rect by inheritance from framebuf. I can assure you it works ;)
Peter Hinch
Index to my micropython libraries.

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

Re: Redirecting terminal/WebRepl to OLED 1306

Post by HermannSW » Fri Oct 05, 2018 11:22 am

pythoncoder wrote:
Fri Oct 05, 2018 9:18 am
I can assure you it works ;)
I said hat it worked for me as well.

What is the process of getting FBConsole into MicroPython?
  1. ask Boochow for allowance
  2. fix the minor issue I stated
  3. do pull request
If so, where in source tree would be the right place?
Pico-W Access Point static file webserver:
https://github.com/Hermann-SW/pico-w

Tiny MicroPython robots (the PCB IS the robot platform)
viewtopic.php?f=5&t=11454

webrepl_client.py
https://github.com/Hermann-SW/webrepl#webrepl-shell

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Redirecting terminal/WebRepl to OLED 1306

Post by pythoncoder » Fri Oct 05, 2018 5:39 pm

Sorry, I mis-read your previous posting.

Users can't put things into the source tree. The procedure is to create a patch and submit a pull request for approval.

I'd explain the process in more detail but I doubt this patch would be accepted on the grounds that it is rather specialised. But that's just my personal opinion; by all means post an RFC on GitHub if you think otherwise.

Secondly it is @boochow's code so it's up to him what happens to it: at the moment it hasn't been released under any particular licence as far as I can see. To be accepted in the source tree it must be released under the MIT licence with a guarantee that it is original work.

The best approach for user contributions is to create a GitHub repository with the code, a licence and a README.md containing documentation. Then publicise its existence here and/or in the Wiki. You'll find numerous examples.

You and @boochow need to get together on this one.
Peter Hinch
Index to my micropython libraries.

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

Re: Redirecting terminal/WebRepl to OLED 1306

Post by boochow » Sat Oct 06, 2018 5:14 am

Secondly it is @boochow's code so it's up to him what happens to it: at the moment it hasn't been released under any particular licence as far as I can see. To be accepted in the source tree it must be released under the MIT licence with a guarantee that it is original work.
FBConsole class have been included in my MicroPython Raspberry Pi port and is released under the MIT license. Everyone can freely use/redistribute it.

https://github.com/boochow/micropython- ... pi/modules

https://github.com/boochow/micropython- ... #fbconsole

For now I'm no plan to request merging FBConsole.py or Raspberry Pi port to the original MicroPython source tree because IMHO they seem to be a bit away from MicroPython's main targets/use cases. But again, this is totally my personal opinion.

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Bare metal Raspberry Pi port

Post by pythoncoder » Sat Oct 06, 2018 5:43 am

Your bare metal Raspberry Pi port has the potential to be a widely used and truly awesome MicroPython platform. The main issue I can see is the inability to write to the SD card. Does this mean writing the SD card on a PC each time you want to update your code? If rshell could do updates I'd find it hard to resist getting a Pi Zero to try it out ;)

Support for keyboard, Ethernet and WiFi would be the icing on the cake :D

Out of interest how quickly does it boot?
Peter Hinch
Index to my micropython libraries.

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

Re: Redirecting terminal/WebRepl to OLED 1306

Post by boochow » Sat Oct 06, 2018 7:52 am

boochow wrote:
Sat Oct 06, 2018 5:14 am
If rshell could do updates I'd find it hard to resist getting a Pi Zero to try it out
Support for keyboard, Ethernet and WiFi would be the icing on the cake
Sorry, this is off-topic but, Yes, after I would have done the PWM class which I am now working on, I will begin adding the function of writing to SD card...
Current release mounts RAM disk on the root so you can use rshell. Of course, it is not permanent but may be useful for debugging scripts.
Anyway, writing to the SD card is definitely important for logging, saving configurations, etc. and I have to deal with it.

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

Re: Redirecting terminal/WebRepl to OLED 1306

Post by HermannSW » Sun Oct 07, 2018 8:45 am

boochow wrote:
Sat Oct 06, 2018 5:14 am
FBConsole class have been included in my MicroPython Raspberry Pi port and is released under the MIT license. Everyone can freely use/redistribute it.

https://github.com/boochow/micropython- ... pi/modules

https://github.com/boochow/micropython- ... #fbconsole
Thanks for the github link, I did just fork your repo:
https://github.com/Hermann-SW/micropyth ... ypi#readme
  • commited limited mission statement of my fork (ESP) to README.md, with sample usecase
  • commited fix for "gpu" ImportError on ESP and "readobj" NameError on ESP
  • enabled Issues, created new issue on changing leftmost char of redirected REPL history command (I don't know whether that bug exists in your Raspberry main use case as well)
Your current version is much better than the one I used before, editing REPL history commands works fine if not changing leftmost character.
Last edited by HermannSW on Sun Oct 07, 2018 9:38 am, edited 1 time in total.
Pico-W Access Point static file webserver:
https://github.com/Hermann-SW/pico-w

Tiny MicroPython robots (the PCB IS the robot platform)
viewtopic.php?f=5&t=11454

webrepl_client.py
https://github.com/Hermann-SW/webrepl#webrepl-shell

User avatar
marfis
Posts: 215
Joined: Fri Oct 31, 2014 10:29 am
Location: Zurich / Switzerland

Re: Bare metal Raspberry Pi port

Post by marfis » Sun Oct 07, 2018 9:28 am

pythoncoder wrote:
Sat Oct 06, 2018 5:43 am

Out of interest how quickly does it boot?
he told me around 4sec...

viewtopic.php?f=12&t=5039&p=28855#p28907

User avatar
mattyt
Posts: 410
Joined: Mon Jan 23, 2017 6:39 am

Re: Redirecting terminal/WebRepl to OLED 1306

Post by mattyt » Mon Oct 08, 2018 10:47 pm

pythoncoder wrote:
Fri Oct 05, 2018 5:39 pm
I'd explain the process in more detail but I doubt this patch would be accepted on the grounds that it is rather specialised. But that's just my personal opinion; by all means post an RFC on GitHub if you think otherwise.
That's my opinion too; it's clearly a really useful tool but I don't think that it should be part of mainline MicroPython. That said, it would be great if it were easier to find/install. Maybe it would be useful to host it on PyPI so it could be upip-installable?

(And yes, the bare metal RPi port is very cool!)

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Redirecting terminal/WebRepl to OLED 1306

Post by pythoncoder » Tue Oct 09, 2018 4:37 am

mattyt wrote:
Mon Oct 08, 2018 10:47 pm
...Maybe it would be useful to host it on PyPI so it could be upip-installable?...
Indeed, I should have mentioned that.
Peter Hinch
Index to my micropython libraries.

Post Reply