Open pavel-rybnicek opened 5 years ago
Python 2 is no longer supported, but yes I think this is still valid. I manage to connect to two bricks, but I might have been lucky, will try to reproduce.
I was able to connect 4 bricks at once over USB with no issues:
>>> from nxt import locator
>>> bricks = locator.find(find_all=True)
>>> brick_list = []
>>> brick_list.append(next(bricks))
>>> brick_list.append(next(bricks))
>>> brick_list.append(next(bricks))
>>> brick_list.append(next(bricks))
>>> for x in brick_list:
... x.get_device_info()
...
('LEDs', '00:16:53:09:52:92', (0, 0, 0, 0), 91912)
('NXT', '00:16:53:09:5F:D8', (0, 0, 0, 0), 91912)
('NXT', '00:16:53:1C:8A:E2', (0, 0, 0, 0), 82516)
('NXT', '00:16:53:16:82:A7', (0, 0, 0, 0), 82260)
(Python 3.10.5, Arch Linux)
Yes, the problem is if you try to do it with two find
, either in the same program or in another one.
I'm trying to control two NXT bricks at once. However when I try to connect to the second brick, I get the "resource busy" error. Am I doing anything wrong? Or is that not possible at all?
There is no problem with a single brick. The code runs on RaspberryPI (but I guess it doesn't matter).