连接到NXT bri的问题

2024-04-26 14:52:54 发布

您现在位置:Python中文网/ 问答频道 /正文

我在python2.7中使用nxt-python 1.2.0PyBluez 0.22PyUsb 1.0.0,在Windows 10上使用LibUSB-Win32 1.2.6.0。我试图连接到我的NXT砖与蓝牙和usb,但我不能让它连接任何一种方式。你知道吗

使用蓝牙时,出现以下错误:

IOError: a connection attempt failed because the brick didn't reply fast enough

当我执行一个示例程序时。你知道吗

然而,python仍然设法使用“host”来提供程序块(或其他我不知道的东西)的蓝牙地址,即使它没有打开!nxt.locator.find_one_brick()给出nxt.bluesock.BlueSock object at 0x04481630

当我尝试使用usb时,我得到:

USBError: [Errno None] libusb0-dll:err [control_msg] sending control message failed, win error: The specific file cant be found.

nxt.locator.find_one_brick() gives nxt.usbsock.USBSock object at 0x0750ADF0

你能帮我用两种方法中的至少一种连接到砖块上吗。谢谢


Tags: 程序objectwindowsfindoneatcontrolusb