Android to another android connected to arduino by usb otg

My Project – Full Overview (with Camera Output)

I’m developing a complex multi-device control system that involves two Android phones, two Arduino boards, and real-time camera feedback. My goal is to remotely control hardware connected to the Arduinos and also receive live visual and status feedback from the system.


Devices Involved

  1. Phone 1 – The Bridge/Controller Phone
  • Physically connected to Arduino 1 via a USB OTG cable.
  • Acts as the central relay: it receives commands from Phone 2, sends them to Arduino 1, receives responses, and forwards them back.
  • Also runs the camera, capturing visuals of the Arduino setup or the task being performed. These visuals are streamed or periodically sent back to Phone 2.
  1. Phone 2 – The Remote Command Phone
  • Used as my remote control interface.
  • Sends commands over a network connection (like Wi-Fi or hotspot) to Phone 1.
  • Receives status updates, command responses, and live camera feedback from Phone 1.
  1. Arduino 1 – Primary Controller
  • Connected via USB OTG to Phone 1.
  • Receives serial commands from Phone 1.
  • Executes hardware functions (like moving a motor, switching lights, reading sensors).
  • Forwards specific commands or data to Arduino 2 when needed.
  1. Arduino 2 – Secondary Hardware Node
  • Connected to Arduino 1 through UART, I2C, or similar.
  • Executes tasks based on relayed commands.
  • Can send data or responses back to Arduino 1 for aggregation and return to Phone 1.

Camera Integration

One of the key features of my project is that Phone 1’s camera will act as a live monitoring tool:

  • The camera will either capture live video (if feasible) or snap periodic images of the Arduino setup in action.
  • This visual feedback is sent to Phone 2, helping me confirm that the remote commands were carried out correctly.
  • It could also help monitor physical actions (e.g., whether a motor moved or a servo turned), especially when I’m not physically present near the devices.
  • This feature is essential for trust and remote verification of the system's operation.

Function Flow – Step by Step

  1. I send a command from Phone 2 over Wi-Fi to Phone 1.
  2. Phone 1 receives the command and sends it to Arduino 1 via USB OTG.
  3. Arduino 1 acts on the command and, if needed, relays it to Arduino 2.
  4. Arduino 2 performs its function and returns a status message to Arduino 1.
  5. Arduino 1 sends a response back to Phone 1.
  6. Phone 1 sends both the status response and camera image/video to Phone 2.
  7. On Phone 2, I can now see if the command worked properly and visually monitor the result.

What I Want to Use

  • MIT App Inventor or Thunkable to build the app on Phone 1 because I prefer block-based visual development over raw Android coding.
  • A USB OTG Serial extension to enable communication between Phone 1 and Arduino 1.
  • A network component (like WebSockets or HTTP requests) to receive commands from Phone 2 and return data.
  • A camera component on Phone 1 to stream or periodically upload snapshots to Phone 2.
  • I'm also exploring if AI tools can help speed up app creation or automate some parts—but so far, I haven’t found an AI that can fully build all of this in one go (especially with OTG + networking + camera support together).

Final Summary

In simple terms, I want to:

  • Use Phone 2 to send commands remotely.
  • Have Phone 1 act as a smart bridge that talks to Arduino 1 (via USB OTG), sends and receives commands, and uses its camera for visual feedback.
  • Use Arduino 1 to perform core tasks and also relay some commands to Arduino 2.
  • Get back responses and camera views from Phone 1 to Phone 2 so I can fully monitor the system remotely.

But I have an feeling that it should be much simpler but I don’t know any work arounds.

Show what you have completed and need help with. Looks like this is mostly app-based, non-Arduino, unless you choose LoRa for the Arduino part for making one Arduino "command" another Arduino to do "tasks" which you can show here.

No doubt.

I honestly do not know where to start in app creating as the blocks in thunkables and mit app inventor are really limited is there any versatile code based platform I can code on

What you (AI) have described is as common as the RC car. Remote commands for steering, speed, brakes, video feedback, all on your phone.

Dump MIT App Inventor. It seems to focus on non-electro-mechanical applications. Find a two-year software engineering study at your local college or skip real learning and search the internet for "how to create an app for android." I learned from reading books and magazines, and I missed so much information compared to a classroom environment, but it is possible to teach yourself.

I can imagine. It's only a phone. I can not imagine anything I need to be done in my world with a phone, that is not to say the world around me doesn't require me to have a phone to fly, drive, eat, pay bills, see a doctor, get a seat at the theater, et c. Follow your interest in app writing (you do not need MIT App Inv).
Maybe start here:

You will immediately see that many prerequisites exist. FOLLOW THEM. It will seem like a long time to get all the "setup" complete just to write your first "Hello, World!" app, but then you are on your way to coding independence.

Tech has changed. I used to run a communication center where "leased line" (like phones, but on dedicated wireline) was the only way. I sent commands and data to things, and the things did their commanded thing with the data. I imagine your phone idea can have a local wireless connection (BT, WiFi) to offload the tasks on pre-programmed Arduinos. Not by me. By you.

Enjoy the journey. Dump chatGPT.

[edit]
Here is a kit that uses a phone app to control an RC vehicle that does stuff, and returns video.

I don't see any wiring diagrams or Arduino code. When you have actually wired up the devices and written a significant amount of code, then we can examine it. Right now, it's a wishlist.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.