File tree Expand file tree Collapse file tree 1 file changed +46
-0
lines changed
Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change 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最大上限,可以手動拉高
You can’t perform that action at this time.
0 commit comments