TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: Weekend Project:Building a Raspberry Pi Zero Laptop from a Cardboard Box

6 点作者 satoshinm超过 7 年前

1 comment

satoshinm超过 7 年前
Updated this blog post just now, I found out how to effectively mirror the Linux console to the OLED module:<p>The basic technique is to run &#x2F;usr&#x2F;bin&#x2F;screendump to capture the Linux console text, then write it to the SSD1325 module over SPI. However, the problem I ran into was this small 2.7&quot; 128x64 display can only fit at most 9 rows and 31 columns of text, much smaller than any normal video mode (like the fabled 25x80 standard).<p>This could be solved by reimplementing a terminal emulator, of course, but an easier solution is to restrict the size of the console. On Linux, this can be accomplished using `stty rows 9` and `stty cols 31`. These commands cannot increase the size, but can decrease the console viewport beneath the maximum supported by the current font and graphics resolution. So now I can use my USB keyboard to interact with the real Linux console, and have it displayed properly on the OLED display, even working as you would expect with full-screen terminal programs such as vi.<p>If anyone is interested updated script (with screenshots) is available at: <a href="https:&#x2F;&#x2F;github.com&#x2F;satoshinm&#x2F;oledterm" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;satoshinm&#x2F;oledterm</a>