0
\$\begingroup\$

I'd like to connect my main Android smartphone (it's a ZTE Blade X) to my Arduino Uno. My main reason is I'd like to use the camera on my phone as a sensor for the Arduino, for various projects.

Is this possible to do, by simply connecting the 4 wires of the phone charger into the Arduino? (The 4 wires are positive, ground, data + and data -, as I'm sure you all already know.)

\$\endgroup\$
  • 4
    \$\begingroup\$ There are ways, but cameras, especially phone camera, are not really useful to an Arduino. You'd probably have to have the phone interpret the image and communicate simple conclusions to the Arduino. Also tying your phone up in a project is inconvenient. \$\endgroup\$ – Chris Stratton Mar 24 '19 at 15:45
2
\$\begingroup\$

Not directly like you think. The 4 wires are for a USB interface, which the atmega328P on the Arduino Uno does not support. There are Arduino boards that have a USB interface AFAIK, but this won't be a trivial thing to do. Or you could add a USB to SPI breakout board, but that probably won't support high speed USB.

Another option is to use a BLE enable Arduino module/board, and connect remotely. But again, you will have a decent bit of programming to do on the phone and the Arduino.

| improve this answer | |
\$\endgroup\$
  • 1
    \$\begingroup\$ The Uno has a USB device interface, and most Android phones can operate as hosts to use it. But none of these ideas are likely to achieve the askers goal. \$\endgroup\$ – Chris Stratton Mar 24 '19 at 15:43
  • \$\begingroup\$ I know of ways to use my phone as a webcam for my computer. Is it possible for the arduino to look at the feed from the webcam software and interpret it from there? Im sorry, this explanation isnt very good, if theres anything youd like me to clarify please ask \$\endgroup\$ – scooter 505 Mar 24 '19 at 16:00
  • \$\begingroup\$ @ChrisStratton Not a native interface. It has a USB -> Serial, which isn't near fast enough, nor supports any of the native USB protocols \$\endgroup\$ – Kyle Hunter Mar 24 '19 at 16:01
  • \$\begingroup\$ No, image interpretation is far betyond an Arduino's capability \$\endgroup\$ – Chris Stratton Mar 24 '19 at 16:02
  • 1
    \$\begingroup\$ @KyleHunter No. An Uno does not utilize an FTDI. And it's still a pointless argument when the MCU can't possibly deal with a firehose worth of data. \$\endgroup\$ – Chris Stratton Mar 24 '19 at 17:21

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