bean-io icon indicating copy to clipboard operation
bean-io copied to clipboard

Connect to multiple Beans in the area.

Open BorisKourt opened this issue 11 years ago • 4 comments

I have a bunch of Beans that I need to connect to simultaneously. Looking through the example and the board object it appears that it always grabs the first it can find. Is there a way to tell it not to?

Thanks.

BorisKourt avatar Oct 09 '14 18:10 BorisKourt

I realize that this is probably a trivial issue, but do you have any suggestions?

BorisKourt avatar Oct 18 '14 04:10 BorisKourt

sorry, i missed this earlier. You can definitely specify which bean to connect to. Just pass in a specific uuid when creating a board instance:

var board = new beanio.Board({uuid: 'xxxx-myUuid-xxxx'});

monteslu avatar Oct 19 '14 14:10 monteslu

Thanks, Is it possible to have it autodiscover all the Beans and create an instance for each one it sees in the vicinity (Like it does with the first one, and then stops the search.)? I have nine Beans right now and don't want to hard-code their UUIDs, as this would keep things more dynamic.

BorisKourt avatar Oct 19 '14 19:10 BorisKourt

Should be pretty easy to write some code to do that, but It would have to be a new API on top of this. Problem is that the IO classes for Johnny-Five are pretty much singletons. Each one represents the connection to a robot instance.

monteslu avatar Oct 20 '14 18:10 monteslu