I've run out of analog pins on Arduino Uno and don't have time to order new parts. I've heard you can connect two Arduinos and I have access to another UNO. If I did that, could I read the analog pins of the second Uno on the first one?

I'm planning to control 7 servos with separate potentiometers.

  • Why not buy an I2C or SPI ADC like the MCP3208? Needs the digital SPI on your Arduino Uno but gives you more 8 analog inputs. You can also buy two MCP3208, put them on the same SPI bus to give you 16 new analog inputs. Inter-Arduino communication is more complicated and costs more money. For I2C you have MCP3428. – Maximilian Gerhardt Mar 6 '19 at 20:30
  • Please tell us what you have connected to the analog pins. Perhaps we can find a way to change that. Do you need 7 potentiometers? It is for example possible to use a single analog input for 7 potentionmeters without extra hardware. That requires 14 digital pins to be able to power each potentiometer seperately. – Jot Mar 6 '19 at 23:11
  • I have connected several potentiometers and servos. I need to control the servo angle in real time, it's a lazer puzzle with mirrors redirecting the beam from one to another with real time inputs from potentiometers. There are 7 servos, each with their separate controls. – user54636 Mar 7 '19 at 8:14

Yes that is possible, you can even use as many Arduino's as you want and send the information to one 'master' Arduino to process the data.

What you need is a way to communicate between them. Depending on distance, speed and reliability, you can chose for Serial, I2C, SPI or more 'exotic' solutions like CAN(bus), RS485 or even wireless methods (with nRF modules).

Some have a simple protocol, for others you might have to make it yourself.

Also think of the processing, you want to do the processing on the main device, or to process as much as possible on the 'slave' Arduinos and send it to the main device.

(Btw, I talk about Master/Slaves), these are not official terms, but meant as example. For example, with CAN, you can send message from any Arduino to any other. With Serial, you can send from 1 Arduino to 1 other.

If you have 2 Arduino's, probably Serial is the easiest.

  • 1
    Serial is best. Other protocols like I2C are bit complex to send and receive, requires understanding of I2C protocols, etc – iudeen Mar 7 '19 at 2:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy