# 在 OLED SSD1306 上顯示二維條碼 ###### tags: `iota` SSD1306 模組為 128 x 64 Dot Matrix,與文字比較,使用二維條碼可儲存更多資料量,並讓使用者更容易取得資訊,如:Hash。選擇較通用、資料容量較大、可容錯的 QR code。 # OLED SSD1306 * 64 x 128 * 16 x 128 黃色區塊 * 48 x 128 藍色區塊 *  * 實際可用為 48 x 128,橫跨兩區塊的 QR code 無法讀取 *  # QR code 版本 * 位元上限 * 48 x 48 * 資料量(英文數字混合) * TX hash: 81 * Tag: 27 * Address: 90 * Message: 2187 * 容錯能力 * 一般情況下使用者大多選擇 M (15%)。 * | Level | Tolerance | | -------- | -------- | | L | 7 % | | M | 15 % | | Q | 25 % | | H | 30 % | * 版本 * http://www.qrcode.com/zh/about/version.html * 建議 * 邊緣留白 4 bits *  * 每 bit 印 4 dots # QR code library * 使用 [ricmoo/qrcode](https://github.com/ricmoo/qrcode) lib * QR code generation library in C, optimized for low-power devices, such as Arduino. * 結果 *  *  * 測試 * 容錯等級設為 M | 版本 | Size | 可顯示 | 可讀 | 容量(英文字母+數字) | | -------- |-------- | -------- | -------- | -------- | -------- | | 1 | 21 x 21 | V | V | 20 | | 2 | 25 x 25 | V | V | 38 | | 3 | 29 x 29 | V | V | 61 | | 4 | 33 x 33 | V | V | 90 | | 5 | 37 x 37 | V | V | 122 | | 6 | 41 x 41 | V | V | 154 | | 7 | 45 x 45 | V | V | 178 | | 8 | 49 x 49 | X | X | 221 | # Reference * [SSD1306 Datasheet](https://cdn-shop.adafruit.com/datasheets/SSD1306.pdf) * [QRcode.com](http://www.qrcode.com/zh/) * [QR Code Essentials ](http://www.nacs.org/LinkClick.aspx?fileticket=D1FpVAvvJuo%3D&tabid=1426&mid=4802) * [QR Code Tutorial](https://www.thonky.com/qr-code-tutorial/introduction) * [ricmoo/qrcode](https://github.com/ricmoo/qrcode)
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up