Skip to content

Commit 5efa55b

Browse files
committed
Docs for the debug might be helpful
1 parent 75c8229 commit 5efa55b

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,3 +147,24 @@ Creative Commons By Attribution Share-Alike v3.0
147147
* Device assembly manual <https://www.robotshop.com/media/files/pdf/owi-535_manual.pdf>
148148
* [OWI (manufacturer) information](http://www.owirobots.com/cart/catalog/OWI-535USB-ROBOTIC-ARM-KIT-with-USB-PC-INTERFACE-Assembled-103.html)
149149
* [PCB Scans](https://kyllikki.github.io/EdgeRobotArm/)
150+
151+
## Enabling Debug Logging
152+
153+
There's debug logging for the USB messages in the arm class using python standard logging.
154+
155+
If you want to see what USB messages are being sent, try this:
156+
157+
```python
158+
>>> import usb_arm
159+
>>> import logging
160+
>>> logging.basicConfig(level=logging.DEBUG)
161+
>>> arm = usb_arm.Arm()
162+
>>> arm.move(usb_arm.ElbowUp)
163+
```
164+
165+
You should see debug messages about the USB messages being sent.
166+
167+
```
168+
DEBUG:usb_arm:Sending ctrl message (<BitPattern arm:16 base:0 led:0>)
169+
DEBUG:usb_arm:Sending ctrl message (<BitPattern arm:0 base:0 led:0>)
170+
```

0 commit comments

Comments
 (0)