Skip to content

Commit

Permalink
📝 add README
Browse files Browse the repository at this point in the history
  • Loading branch information
KafCoppelia committed Sep 20, 2023
1 parent 4fa1c0a commit 6bbabf3
Show file tree
Hide file tree
Showing 4 changed files with 122 additions and 118 deletions.
39 changes: 37 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,37 @@
# nRF7002-DK-nfc-function-switching
Switch NFC functions between recording text & launcing app based on nRF7002-DK.
# nRF7002-DK NFC function switching

基于nRF7002-DK,使用nRF Connect SDK `v2.4.2` 开发,使用NFC外设,实现NFC记录英文文本信息、中文文本信息与打开安卓应用三个功能,并可通过按键切换,通过手机NFC触碰即可触发。

# 📦 Prerequisites

1. nRF Connect SDK `v2.4.2`
2. 环境安装参见 [官网文档](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/index.html)

# 🛠️ How to run

1. 激活 `west` 工具所在的Python虚拟环境
2. 进入 `ncs` workspace
3. 编译工程

``` shell
west build <PATH-TO-PROJECT> -d <PATH-TO-PROJECT>/build
```

4. 下载程序

``` shell
west flash -d <PATH-TO-PROJECT>/build
```

5. 由于已经在 `CMakeLists.txt` 中。设置 `set(BOARD nrf7002dk_nrf5340_cpuapp)` ,因此无需在编译时指定 `-b`

# 📜 Documentation

## ⛓️ Workflow

<img src="./images/workflow.png" width="600px" alt="Workflow">

## 📽️ More details

1. 项目详细说明,[CSDN:基于nRF7002-DK的NFC功能切换系统(nRF Connect SDK+NFC)](https://blog.csdn.net/weixin_46422143/article/details/132958016)
2. 项目效果演示,[B站:基于nRF7002-DK的NFC功能切换系统](https://www.bilibili.com/video/BV1qk4y1F7KJ)
116 changes: 0 additions & 116 deletions README.rst

This file was deleted.

85 changes: 85 additions & 0 deletions images/img.drawio
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<mxfile host="app.diagrams.net" modified="2023-09-18T14:53:50.380Z" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36" etag="L_5Z1OJr6kjfh81Jevdc" version="21.7.5" type="device">
<diagram name="第 1 页" id="ai0rzUFodC30zfMmN4H8">
<mxGraphModel dx="658" dy="418" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="s31uAU_lcFU2yAiic23B-5" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fontFamily=Times New Roman;" edge="1" parent="1" source="s31uAU_lcFU2yAiic23B-1" target="s31uAU_lcFU2yAiic23B-2">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="s31uAU_lcFU2yAiic23B-1" value="板卡(按键、LED)初始化" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=Times New Roman;" vertex="1" parent="1">
<mxGeometry x="270" y="120" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="s31uAU_lcFU2yAiic23B-6" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fontFamily=Times New Roman;" edge="1" parent="1" source="s31uAU_lcFU2yAiic23B-2" target="s31uAU_lcFU2yAiic23B-4">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="s31uAU_lcFU2yAiic23B-2" value="nfc_t2t_setup" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=Times New Roman;" vertex="1" parent="1">
<mxGeometry x="280" y="180" width="80" height="30" as="geometry" />
</mxCell>
<mxCell id="s31uAU_lcFU2yAiic23B-3" value="注册nfc_callback" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontFamily=Times New Roman;" vertex="1" parent="1">
<mxGeometry x="200" y="180" width="80" height="30" as="geometry" />
</mxCell>
<mxCell id="s31uAU_lcFU2yAiic23B-15" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fontFamily=Times New Roman;" edge="1" parent="1" source="s31uAU_lcFU2yAiic23B-4" target="s31uAU_lcFU2yAiic23B-14">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="s31uAU_lcFU2yAiic23B-4" value="创建与编码文本信息" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=Times New Roman;" vertex="1" parent="1">
<mxGeometry x="260" y="230" width="120" height="30" as="geometry" />
</mxCell>
<mxCell id="s31uAU_lcFU2yAiic23B-20" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;fontFamily=Times New Roman;" edge="1" parent="1" source="s31uAU_lcFU2yAiic23B-9" target="s31uAU_lcFU2yAiic23B-11">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="s31uAU_lcFU2yAiic23B-9" value="dk_read_buttons" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=Times New Roman;" vertex="1" parent="1">
<mxGeometry x="430" y="330" width="100" height="30" as="geometry" />
</mxCell>
<mxCell id="s31uAU_lcFU2yAiic23B-25" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;fontFamily=Times New Roman;" edge="1" parent="1" source="s31uAU_lcFU2yAiic23B-11" target="s31uAU_lcFU2yAiic23B-21">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="s31uAU_lcFU2yAiic23B-11" value="DK_BTN1按下?" style="rhombus;whiteSpace=wrap;html=1;fontFamily=Times New Roman;" vertex="1" parent="1">
<mxGeometry x="420" y="280" width="120" height="30" as="geometry" />
</mxCell>
<mxCell id="s31uAU_lcFU2yAiic23B-18" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fontFamily=Times New Roman;" edge="1" parent="1" source="s31uAU_lcFU2yAiic23B-14" target="s31uAU_lcFU2yAiic23B-17">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="s31uAU_lcFU2yAiic23B-14" value="nfc_t2t_payload_set" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=Times New Roman;" vertex="1" parent="1">
<mxGeometry x="260" y="280" width="120" height="30" as="geometry" />
</mxCell>
<mxCell id="s31uAU_lcFU2yAiic23B-19" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontFamily=Times New Roman;" edge="1" parent="1" source="s31uAU_lcFU2yAiic23B-17" target="s31uAU_lcFU2yAiic23B-9">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="s31uAU_lcFU2yAiic23B-17" value="nfc_t2t_emulation_start" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=Times New Roman;" vertex="1" parent="1">
<mxGeometry x="250" y="330" width="140" height="30" as="geometry" />
</mxCell>
<mxCell id="s31uAU_lcFU2yAiic23B-27" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;fontFamily=Times New Roman;" edge="1" parent="1" source="s31uAU_lcFU2yAiic23B-21" target="s31uAU_lcFU2yAiic23B-23">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="s31uAU_lcFU2yAiic23B-21" value="nfc_t2t_emulation_stop" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=Times New Roman;" vertex="1" parent="1">
<mxGeometry x="410" y="230" width="140" height="30" as="geometry" />
</mxCell>
<mxCell id="s31uAU_lcFU2yAiic23B-28" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;fontFamily=Times New Roman;" edge="1" parent="1" source="s31uAU_lcFU2yAiic23B-23" target="s31uAU_lcFU2yAiic23B-26">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="s31uAU_lcFU2yAiic23B-23" value="根据记录值创建与编码文本/APP信息" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=Times New Roman;" vertex="1" parent="1">
<mxGeometry x="420" y="170" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="s31uAU_lcFU2yAiic23B-30" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;fontFamily=Times New Roman;" edge="1" parent="1" source="s31uAU_lcFU2yAiic23B-26" target="s31uAU_lcFU2yAiic23B-29">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="s31uAU_lcFU2yAiic23B-26" value="nfc_t2t_payload_set" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=Times New Roman;" vertex="1" parent="1">
<mxGeometry x="420" y="120" width="120" height="30" as="geometry" />
</mxCell>
<mxCell id="s31uAU_lcFU2yAiic23B-33" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fontFamily=Times New Roman;" edge="1" parent="1" source="s31uAU_lcFU2yAiic23B-29" target="s31uAU_lcFU2yAiic23B-32">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="s31uAU_lcFU2yAiic23B-29" value="nfc_t2t_emulation_start" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=Times New Roman;" vertex="1" parent="1">
<mxGeometry x="410" y="70" width="140" height="30" as="geometry" />
</mxCell>
<mxCell id="s31uAU_lcFU2yAiic23B-34" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;fontFamily=Times New Roman;" edge="1" parent="1" source="s31uAU_lcFU2yAiic23B-32" target="s31uAU_lcFU2yAiic23B-9">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="s31uAU_lcFU2yAiic23B-32" value="延迟200ms" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=Times New Roman;" vertex="1" parent="1">
<mxGeometry x="560" y="190" width="70" height="30" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>
Binary file added images/workflow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6bbabf3

Please sign in to comment.