Go Down

Topic: two Arduinos as slave (Read 1 time) previous topic - next topic

xkaterboi

hi i want to coonect two arduino leonardos as slave to the master, a laptop.
i've got two RN 42 Bluetooth modules and two arduino leonardos.
is it possible to connect two arduinos as slaves?
i am using MATLAB to do this.

PaulS

Master/slave have relationship only in some context. You have not defined the context.

You may or may not be be able to have multiple slaves connected to one master.
The art of getting good answers lies in asking good questions.

xkaterboi

i'm sorry if its not clear,
i need to send control signals to two leonardo based robots at the same time,
i have rn 42 modules fixed on board.
no need of two way communication,
just to receive the commands from the laptop.

PaulS

Since there is to be no interaction between the slaves, I see no reason for you not to be able to connect two Leonardos to the PC. If you can work with one, you can work with two.

Now, MATLAB might not be able to, but that's not an Arduino problem.
The art of getting good answers lies in asking good questions.

xkaterboi

matlab is able as its addressing the port and the port is connected to the bluetooth tx.
my doubt is since there is only a single port to connect and two bluetooth devices are there (ie, the arduinos),
is it possible to address the recipient using the mac address or anything., if any?

PaulS

Quote
my doubt is since there is only a single port to connect and two bluetooth devices are there (ie, the arduinos),

But there aren't two devices there. Each bluetooth device is a separate serial port. You need two connections from the PC to the two bluetooth devices that are connected to the Arduinos.

Quote
is it possible to address the recipient using the mac address or anything., if any?

No. Arduinos don't have unique IDs.
The art of getting good answers lies in asking good questions.

xkaterboi

Quote
Each bluetooth device is a separate serial port.

so two rn 42 slaves will be on two serial ports?

i asked about the mac address of the bluetooth device thats the rn 42.

PaulS

Quote
so two rn 42 slaves will be on two serial ports?

Yes.
The art of getting good answers lies in asking good questions.

zoomkat

have you actually tried connecting both slave rx pins to the tx of the pc? You should be able to encode in the packets sent to the slave an identifier that allows the slaves to identify which packets are for them.
Google forum search: Use Google Search box in upper right side of this page.
Why I like my 2005 Rio Yellow Honda S2000  https://www.youtube.com/watch?v=pWjMvrkUqX0

Go Up