Skip to content

Instantly share code, notes, and snippets.

@boochow
Last active June 29, 2018 16:12
Show Gist options
  • Save boochow/4e2ebf71531f90844cd1a34f7c4a3d20 to your computer and use it in GitHub Desktop.
Save boochow/4e2ebf71531f90844cd1a34f7c4a3d20 to your computer and use it in GitHub Desktop.
import gpu
import framebuf
import FBConsole
class RPiScreen(framebuf.FrameBuffer):
def __init__(self, width, height):
self.width = width
self.height = height
gpu.fb_init(width,height,screen_w=1920,screen_h=1080)
super().__init__(gpu.fb_data(),width,height,framebuf.RGB565)
self
def show(self):
pass
def set_fb_console():
import os
theScreen = FBConsole(RPiScreen(480,270))
os.dupterm(theScreen)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment