0

I am thinking about a project, but I will need let's say two Arduino Uno. I can see that we can just use different USB ports on a PC, but what about an Android device?

I want to "run commands" from it on both Uno boards. Is it possible to connect it as it is single board, just both in parallel? I do not need communication between the boards, just with the smartphone.

For example, let's say that one of the boards will control a green LED and the other a red LED. I want to send from my phone on the serial "toggle green" or "toggle red" and both the boards will change the state of the LED connected to it accordingly to the "command" received. Will both boards be able to receive the "command"?

Thank you!

EDIT: I see that I forgot to add that I may need to receive on the phone from any of the boards. Something like feedback.

5
  • 1
    USB hub . . . ?
    – Majenko
    Jun 24 '18 at 15:29
  • Yeah that could be possibility, but I want to run them as it is single. Isn't it possible? Jun 24 '18 at 16:03
  • let one arduino handle both leds. can't be far one from other if you have a usb connection
    – Juraj
    Jun 24 '18 at 16:45
  • How do you connect a single Arduino to your phone now? Jun 25 '18 at 13:11
  • Juraj, I just give an example. I am going to use all the analog pins, so I will need more (and second chip will it be), I do not want PWM because they flicker on camera. Dmitry Grigoryev, at this moment I have not used anything. I see that I can use data cable, and the arduino IDE from the appstore. Thank you for the comments! Jun 25 '18 at 15:45
2

Use a third Arduino, which serves as a hub. It is connected to your Android and to all Arduino Uno devices you want to interface. It passes the commands to all Arduino devices, and the feedbacks to the Android device. You could use for instance an Arduino Mega, with the Android on Serial0, and the Arduino Uno devices on Serial1 and Serial2.

2
  • 1
    That should do the trick. I was thinking the same but I did not know why should I waste the 40 digital pins on the Mega, But since that's the only case I will do it. Since it will be on my car, managing my headlights (going to add projectors) maybe I will manage to use them from something else.. Thanks again! : ] Jun 25 '18 at 15:48
  • You could use a smaller device like an Arduino Uno, with SoftSerial instead of S1/2.
    – dda
    Jun 25 '18 at 16:31

Not the answer you're looking for? Browse other questions tagged or ask your own question.