{"id":21949635,"url":"https://github.com/taichunmin/waveshare-epd-demo","last_synced_at":"2025-03-22T17:24:59.256Z","repository":{"id":40617350,"uuid":"426559031","full_name":"taichunmin/waveshare-epd-demo","owner":"taichunmin","description":"ST25R3911B DEMO Code","archived":false,"fork":false,"pushed_at":"2022-06-22T19:22:32.000Z","size":22758,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-27T20:47:20.415Z","etag":null,"topics":["waveshare","waveshare-eink"],"latest_commit_sha":null,"homepage":"https://www.waveshare.net/wiki/ST25R3911B_NFC_Board","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/taichunmin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-11-10T09:23:40.000Z","updated_at":"2024-02-06T19:54:06.000Z","dependencies_parsed_at":"2022-08-27T01:12:26.283Z","dependency_job_id":null,"html_url":"https://github.com/taichunmin/waveshare-epd-demo","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/taichunmin%2Fwaveshare-epd-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taichunmin%2Fwaveshare-epd-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taichunmin%2Fwaveshare-epd-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taichunmin%2Fwaveshare-epd-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/taichunmin","download_url":"https://codeload.github.com/taichunmin/waveshare-epd-demo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244993273,"owners_count":20543946,"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":["waveshare","waveshare-eink"],"created_at":"2024-11-29T05:32:58.393Z","updated_at":"2025-03-22T17:24:59.224Z","avatar_url":"https://github.com/taichunmin.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 微雪電子 ST25R3911B NFC Board 範例程式\n\n* 來源 1: \u003chttps://www.waveshare.net/wiki/ST25R3911B_NFC_Board\u003e\n* 來源 2: \u003chttps://github.com/waveshare/e-Paper\u003e\n\n## 文件\n\n* [原理圖](https://www.waveshare.net/w/upload/d/da/ST25R3911B_NFC_Board_Schematic.pdf)\n* [X-CUBE-NFC5函數說明手冊](https://www.waveshare.net/w/upload/0/01/X-CUBE-NFC5.7z)\n* [ST25R3911數據手冊(英文）](https://www.waveshare.net/w/upload/5/52/St25r3911b_EN.pdf)\n* [ST25R3911數據手冊(中文）](https://www.waveshare.net/w/upload/b/bb/St25r3911b_ZH.pdf)\n* [測試圖片](https://www.waveshare.net/w/upload/a/ad/Picture.zip)\n\n## 無源 NFC 電子墨水屏 刷圖範例\n\n* 原始碼: [`./User/Browser`](https://github.com/taichunmin/waveshare-epd-demo/tree/master/User/Browser)\n\n### 步驟\n\n* 用 USB 先連接讀寫器的 USB 口到電腦或者 5V 電源\n* 將做好的單色位圖放置於 Micro SD 卡。將 Micro SD 卡插入 NFC Board 的卡槽中\n* 連接 5V 電源到 NFC Board 的 USB 接口\n* 屏幕顯示目錄，通過按鍵選擇墨水屏型號和對應的圖片刷新即可\n  * 用按鍵移動選擇 Update e-Paper Demo 選項。\n  * 根據屏幕的型號選擇要刷新的屏幕型號\n  * 選擇圖片(注意需要選擇和屏幕分辨率一致的圖片）\n  * 確定圖片\n  * 將 NFC Board 的線圈放置於 4.2inch NFC-Powered e-Paper 靠近中心位置\n  * 等待刷圖成功\n* 如果提示刷新失敗，請拿開讀寫器重新放置感應刷新\n\n![](https://i.imgur.com/Zz9jBxc.png)\n\n\u003e 由於 NFC 屬於通信距離有限， 在刷新的時候為了提高成功率，請不要輕易移動設備。\n\n### 圖片\n\n| ![](https://i.imgur.com/m7yXoyq.png) | ![](https://i.imgur.com/UP5glYV.png) | ![](https://i.imgur.com/t2G0FRt.png) |\n| :-----: | :-----: | :-----: |\n| 選擇程序 | 選擇屏幕型號 | 選擇圖片 |\n| ![](https://i.imgur.com/50EMj0Q.png) | ![](https://i.imgur.com/UOqRFMn.png) | ![](https://i.imgur.com/jQtSJQf.png) |\n| 確認選擇 | 從TF卡讀取圖片 | 提示將讀寫器線圈貼到屏幕 |\n| ![](https://i.imgur.com/0UZR2pv.png) | ![](https://i.imgur.com/34BZSAD.png) | ![](https://i.imgur.com/IWLhJN0.png) |\n| 感應屏幕成功 | 配置屏幕 | 刷新中 |\n| ![](https://i.imgur.com/SDcyZaE.png) |  |  |\n| 刷新成功，按鍵退出 |  |  |\n\n## 墨水屏刷新原理 (1.54 黑白紅)\n\n資料來源: \u003chttps://www.waveshare.net/wiki/1.54inch_e-Paper_Module_(B)\u003e\n\n### 工作原理\n\n本產品使用的電子紙採用“微膠囊電泳顯示”技術進行圖像顯示，其基本原理是懸浮在液體中的帶電納米粒子受到電場作用而產生遷移。電子紙顯示屏是靠反射環境光來顯示圖案的，不需要背光，在環境光下，電子紙顯示屏清晰可視，可視角度幾乎達到了 180°。因此，電子紙顯示屏非常適合閱讀。\n\n### 像素與字節的關系\n\n對於黑白紅三色，可以拆分為黑白圖片、紅白圖片，然後將兩張圖片疊加起來就變成了黑白紅圖片了。\n\n對於黑白圖片，我們可以規定，如果如果是黑色我們定義成0，如果是白色就定義成1，那麼有了表示顏色的方式：\n\n```\n白色：□，對應1\n黑色：■，對應0\n```\n\n一個點在圖形上一般稱之為像素點（pixel）,而顏色不是1就是0，也就是1個位就可以標識顏色：1Pixel = 1bit，那麼一個字節裡面就包含了8個像素點。\n\n以16個像素點為例，我們假設前8個像素點為黑，後8個像素點為白色，那麼可以這麼認為，像素點1-16，對應這0位到15位，0表示黑色，1表示白色：\n\n![](https://i.imgur.com/2kQvqwj.png)\n\n對於計算機而言，它的數據存儲方式是高位在前，低位在後，且一個字節只有8個位，因此會有一點改變：\n\n![](https://i.imgur.com/HYrgYSt.png)\n\n這樣只需要2個字節即可表示16個像素點了。\n\n1.54inch e-paper B 是紅黑白三色，我們需要把圖片拆成2張圖片，一張黑白圖片，一張紅白圖片，在傳輸的時候因為一個寄存器是控制黑白顯示的，一個寄存器是控制紅白顯示。\n\n有一點特殊的是，1.54的黑白部分1個字節裡面需要2個位才能控制1個像素點，而控制紅白1個字節可以控制8個像素點。舉個栗子，假設有8個像素點，前面4個是紅色，後面4個黑色：需要把他們拆成一個黑白圖片，一個紅白圖片，這兩個圖片都是8個像素點，只不過黑白圖片前四個像素為白色，後4個像素點為黑色，而紅白圖片前4個像素點為紅色，後四個像素點為白色。\n\n![](https://i.imgur.com/akReUhf.png)\n\n如果我們規定，白色存儲為1，紅色或者黑色存儲為0，那麼就有了如下的表示：\n\n![](https://i.imgur.com/4NJrQC5.png)\n\n上面說了1.54的黑白部分需要2個位才能控制1個像素點，那麼表示8個像素點需要16個位才能表示，也就是2個字節，規定2個位同時為1表示；控制紅白1個字節可以控制8個像素點，需要1個字節表示；\n\n![](https://i.imgur.com/9KFNAKZ.png)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaichunmin%2Fwaveshare-epd-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftaichunmin%2Fwaveshare-epd-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaichunmin%2Fwaveshare-epd-demo/lists"}