https://simonwillison.net/atom/everything 10月29日 03:33
GitHub Universe 徽章:WiFi彩色屏幕黑客之旅
index_new5.html
../../../zaker_core/zaker_tpl_static/wap/tpl_guoji1.html

 

今年的 GitHub Universe 会议徽章集成了 Raspberry Pi、彩色屏幕、WiFi 和蓝牙,成为一个功能强大的迷你电脑。文章详细介绍了如何配置徽章以显示 GitHub 个人资料,并指导读者如何通过 MicroPython 开发自定义应用。作者利用 AI 工具 Claude Code 辅助代码分析和新应用开发,并分享了其创建的在线图标编辑器和基于 WebUSB 的徽章 REPL 工具。该徽章由 Pimoroni 公司制造,未来有望以“Pimoroni Tufty 2350”的名字公开销售。

🌟 **强大的会议徽章硬件**:今年的 GitHub Universe 会议徽章不再是简单的身份标识,而是集成了 Raspberry Pi、彩色屏幕、WiFi 和蓝牙,使其成为一个功能齐全的迷你计算机。这种硬件升级为参会者提供了更多互动和开发的可能性,远超往年仅配备 eInk 显示屏的徽章。

🔧 **MicroPython 开发与定制**:徽章的代码完全基于 MicroPython,并设计为高度可 hack。通过 USB-C 连接到电脑,用户可以直接修改设备上的代码,开发和部署自己的应用程序。文章详细介绍了如何配置 WiFi 和 GitHub 用户名,以及如何通过官方文档或 AI 工具(如 Claude Code)来探索和扩展徽章的功能,例如添加新的应用程序和调试信息。

💡 **AI 辅助开发与实用工具**:作者展示了如何利用 AI 工具 Claude Code 来分析现有代码、生成新的应用程序逻辑,甚至修复代码错误。在此基础上,作者还开发了两个实用的在线工具:一个图标编辑器,用于创建徽章应用程序的 24x24 像素图标;以及一个基于 WebUSB 的 REPL(Read-Eval-Print Loop)工具,允许用户通过浏览器直接与徽章进行交互和文件管理。

🚀 **未来硬件展望**:该徽章由英国 Pimoroni 公司为 GitHub Universe 定制开发,虽然目前仅限会议参与者获取,但文章透露未来将有一款名为“Pimoroni Tufty 2350”的版本公开发售,这意味着爱好者们将有机会拥有和体验类似的功能。

Hacking the WiFi-enabled color screen GitHub Universe conference badge

28th October 2025

I’m at GitHub Universe this week (thanks to a free ticket from Microsoft). Yesterday I picked up my conference badge... which incorporates a full Raspberry Pi with a battery, color screen, WiFi and bluetooth.

GitHub Universe has a tradition of hackable conference badges—the badge last year had an eInk display. This year’s is a huge upgrade though—a color screen and WiFI connection makes this thing a genuinely useful little computer!

The only thing it’s missing is a keyboard—the device instead provides five buttons total—Up, Down, A, B, C. It might be possible to get a bluetooth keyboard to work though I’ll believe that when I see it—there’s not a lot of space on this device for a keyboard driver.

Everything is written using MicroPython, and the device is designed to be hackable: connect it to a laptop with a USB-C cable and you can start modifying the code directly on the device.

Getting setup with the badge

Out of the box the badge will play an opening animation (implemented as a sequence of PNG image frames) and then show a home screen with six app icons.

The default apps are mostly neat Octocat-themed demos: a flappy-bird clone, a tamagotchi-style pet, a drawing app that works like an etch-a-sketch, an IR scavenger hunt for the conference venue itself (this thing has an IR sensor too!), and a gallery app showing some images.

The sixth app is a badge app. This will show your GitHub profile image and some basic stats, but will only work if you dig out a USB-C cable and make some edits to the files on the badge directly.

I did this on a Mac. I plugged a USB-C cable into the badge which caused MacOS to treat it as an attached drive volume. In that drive are several files including secrets.py. Open that up, confirm the WiFi details are correct and add your GitHub username. The file should look like this:

WIFI_SSID = "..."WIFI_PASSWORD = "..."GITHUB_USERNAME = "simonw"

The badge comes with the SSID and password for the GitHub Universe WiFi network pre-populated.

That’s it! Unmount the disk, hit the reboot button on the back of the badge and when it comes back up again the badge app should look something like this:

Building your own apps

Here’s the official documentation for building software for the badge.

When I got mine yesterday the official repo had not yet been updated, so I had to figure this out myself.

I copied all of the code across to my laptop, added it to a Git repo and then fired up Claude Code and told it:

Investigate this code and add a detailed README

Here’s the result, which was really useful for getting a start on understanding how it all worked.

Each of the six default apps lives in a apps/ folder, for example apps/sketch/ for the sketching app.

There’s also a menu app which powers the home screen. That lives in apps/menu/. You can edit code in here to add new apps that you create to that screen.

I told Claude:

Add a new app to it available from the menu which shows network status and other useful debug info about the machine it is running on

This was a bit of a long-shot, but it totally worked!

The first version had an error:

I OCRd that photo (with the Apple Photos app) and pasted the message into Claude Code and it fixed the problem.

This almost worked... but the addition of a seventh icon to the 2x3 grid meant that you could select the icon but it didn’t scroll into view. I had Claude fix that for me too.

Here’s the code for apps/debug/__init__.py, and the full Claude Code transcript created using my terminal-to-HTML app described here.

Here are the four screens of the debug app:

An icon editor

The icons used on the app are 24x24 pixels. I decided it would be neat to have a web app that helps build those icons, including the ability to start by creating an icon from an emoji.

I bulit this one using Claude Artifacts. Here’s the result, now available at tools.simonwillison.net/icon-editor:

And a REPL

I noticed that last year’s badge configuration app (which I can’t find in github.com/badger/badger.github.io any more, I think they reset the history on that repo?) worked by talking to MicroPython over the Web Serial API from Chrome. Here’s my archived copy of that code.

Wouldn’t it be useful to have a REPL in a web UI that you could use to interact with the badge directly over USB?

I pointed Claude Code at a copy of that repo and told it:

Based on this build a new HTML with inline JavaScript page that uses WebUSB to simply test that the connection to the badge works and then list files on that device using the same mechanism

It took a bit of poking (here’s the transcript) but the result is now live at tools.simonwillison.net/badge-repl. It only works in Chrome—you’ll need to plug the badge in with a USB-C cable and then click “Connect to Badge”.

Get hacking

If you’re a GitHub Universe attendee I hope this is useful. The official badger.github.io site has plenty more details to help you get started.

There isn’t yet a way to get hold of this hardware outside of GitHub Universe—I know they had some supply chain challenges just getting enough badges for the conference attendees!

It’s a very neat device, built for GitHub by Pimoroni in Sheffield, UK. A version of this should become generally available in the future under the name “Pimoroni Tufty 2350”.

Fish AI Reader

Fish AI Reader

AI辅助创作,多种专业模板,深度分析,高质量内容生成。从观点提取到深度思考,FishAI为您提供全方位的创作支持。新版本引入自定义参数,让您的创作更加个性化和精准。

FishAI

FishAI

鱼阅,AI 时代的下一个智能信息助手,助你摆脱信息焦虑

联系邮箱 441953276@qq.com

相关标签

GitHub Universe Conference Badge Raspberry Pi MicroPython Hacking AI Development Pimoroni Tufty 2350
相关文章