Skip to content

Commit a5da94a

Browse files
committed
feat: update readme
1 parent 8290a94 commit a5da94a

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

readme.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# DGLAB V3 webhook
2+
3+
僅提供客戶端\
4+
並無伺服端功能
5+
6+
> [!Warning]
7+
> 絕讚開發中,測試尚未編寫完全
8+
9+
## 安裝
10+
11+
```bash
12+
pip install --upgrade dglabv3
13+
```
14+
15+
## 簡單範例
16+
17+
```python
18+
import asyncio
19+
from dglabv3 import dglabv3
20+
from dglabv3 import Channel, StrengthType, Pulse
21+
22+
23+
client = dglabv3()
24+
25+
26+
async def run():
27+
try:
28+
await client.connect_and_wait(timeout=30)
29+
print(client.generate_qrcode_text())
30+
await client.wait_for_app_connect(timeout=60)
31+
client.set_strength_value(Channel.A, 20)
32+
await asyncio.sleep(1)
33+
client.send_wave_message(Pulse().breath, 30, Channel.A)
34+
35+
except Exception as e:
36+
print(f"An error occurred: {e}")
37+
exit(1)
38+
39+
40+
if __name__ == "__main__":
41+
asyncio.run(run())
42+
43+
```
44+
45+
> [!Note]
46+
> 如果發現無法設置到自己想要的強度,請檢察目前最高強度在哪裡,預設是40秒+1最大上限,可以手動拉高

0 commit comments

Comments
 (0)