Skip to content

Commit db67a86

Browse files
skeleMortalJohnAZoidberg
authored andcommitted
Update commands.md
Fixed typos in example code
1 parent 83f63d4 commit db67a86

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

commands.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ Simple example in Python:
99
```python
1010
import serial
1111

12-
def send_command(command_id, parameters, with_response=False)
13-
with serial.Serial(/dev/ttyACM0, 115200) as s:
12+
def send_command(command_id, parameters, with_response=False):
13+
with serial.Serial("COM4", 115200) as s:
1414
s.write([0x32, 0xAC, command_id] + parameters)
1515

1616
if with_response:
@@ -20,7 +20,7 @@ def send_command(command_id, parameters, with_response=False)
2020
# Go to sleep and check the status
2121
send_command(0x03, [True])
2222
res = send_command(0x03, [], with_response=True)
23-
print(f"Is currently sleeping: {bool(res[0])})
23+
print(f"Is currently sleeping: {bool(res[0])}")
2424
```
2525

2626
Many commands support setting and writing a value, with the same command ID.

0 commit comments

Comments
 (0)