{"id":13802026,"url":"https://github.com/boochow/FBConsole","last_synced_at":"2025-05-13T12:32:12.772Z","repository":{"id":112528990,"uuid":"156715426","full_name":"boochow/FBConsole","owner":"boochow","description":"frame buffer console class for MicroPython","archived":false,"fork":false,"pushed_at":"2019-10-12T08:54:04.000Z","size":2873,"stargazers_count":60,"open_issues_count":1,"forks_count":12,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-11T16:52:34.409Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/boochow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-11-08T14:01:34.000Z","updated_at":"2025-03-19T02:57:08.000Z","dependencies_parsed_at":"2023-05-15T16:45:31.892Z","dependency_job_id":null,"html_url":"https://github.com/boochow/FBConsole","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boochow%2FFBConsole","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boochow%2FFBConsole/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boochow%2FFBConsole/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boochow%2FFBConsole/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/boochow","download_url":"https://codeload.github.com/boochow/FBConsole/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253942543,"owners_count":21988076,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T00:01:33.532Z","updated_at":"2025-05-13T12:32:12.405Z","avatar_url":"https://github.com/boochow.png","language":"Python","funding_links":[],"categories":["Libraries"],"sub_categories":["Communications"],"readme":"# FBConsole\n\nFramebuffer console class for MicroPython.\n\nYou can redirect REPL to any framebuffer devices.\n\n## Usage\n\nThe example below duplicates REPL output to SSD1306 OLED connected to ESP32 via I2C(SDA=Pin22, SCL=Pin21).\n```\nfrom machine import Pin, I2C\nfrom ssd1306 import SSD1306_I2C\ni2c = I2C(scl=Pin(21), sda=Pin(22), freq=400000)\noled = SSD1306_I2C(128, 64, i2c)\n\nfrom fbconsole import FBConsole\nimport os\nscr = FBConsole(oled)\nos.dupterm(scr)        # redirect REPL output to OLED\nhelp()                 # and print something\nos.dupterm(None)       # then disconnect OLED from REPL\nscr.cls()              # and clear OLED screen\n```\n![top-page](https://raw.githubusercontent.com/boochow/FBConsole/images/dupterm-oled.gif)\n\n## ST7735 Wrapper\n\nST7735fb.py is a wrapper class to use FBConsole with ST7735-based small TFT LCD.\nIt provides some of FrameBuffer class APIs necessary to use FBConsole.\nUse this with [ST7735 driver for MicroPython](https://github.com/boochow/MicroPython-ST7735).\nOnly LCDs with ST7735S(and maybe ST7735R) are supported because this wrapper class requires hardware scroll functionality.\n\n## petme128 font\n\npetme128.py is a font converted from ``petme128-font.c`` used in the framebuf class of MicroPython.\n\n## ST7735fb usage\n\n```\n# This example is for ESP32 + ST7735S TFT LCD\nfrom ST7735 import TFT\nfrom machine import SPI,Pin\nspi = SPI(2, baudrate=20000000, polarity=0, phase=0, sck=Pin(14), mosi=Pin(13), miso=Pin(12))\ntft=TFT(spi,16,17,18)\ntft.initb2()\ntft.rgb(True)\n\n# Assign 2 pixels for fixed and invisible area\n# (ST7735S frame buffer vertical size is 162 pixels)\ntft.setvscroll(1, 1)\n\n# Wrapper object for FBConsole\nfrom ST7735fb import TFTfb\nfrom petme128 import petme128\nfb = TFTfb(tft, petme128)\n\n# redirect MicroPython terminal to ST7735\nfrom fbconsole import FBConsole\nscr = FBConsole(fb, TFT.BLACK, TFT.WHITE)\n\nimport os\nos.dupterm(scr) \n```\n![top-page](https://raw.githubusercontent.com/boochow/FBConsole/images/st7735-dupterm.jpg)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboochow%2FFBConsole","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fboochow%2FFBConsole","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboochow%2FFBConsole/lists"}