Bluetooth communication between Arduino and PyBluez

独自空忆成欢 提交于 2019-12-04 21:43:22

This line of yours:

data = sock.recv(1)

may be not receiving enough bytes so try this info posted by Tim: Only receiving one byte from socket

Using the Itade Studio Bluetooth Shield, you have to upload the code without the shield attached, and then attach the shield. I'm curious if this is so with other bluetooth units.

For the sake of completion, to establish communication between your laptop and Arduino Uno w/BT shield:

  1. Pair your laptop with the bluetooth shield

  2. Upload Arduino code with shield detached.

  3. Attach the shield

  4. Run python module.

On the itade shield, you know when connection is established when the D1 led turns solid green, as oppose to flickering green.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!