Two Arduinos connected through digital pins?


hi all,
this may answered elsewhere here goes anyhow. have 2 arduino micro controllers in robot project. 1 controlling motors , servos, other used reading sensors in robot.

i did read output of controllers and/or write controllers @ same time if wanted to.

one of tasks needs handled robot driving around house. electrical system  has 1 common ground bus electronics in robot.

so idea reading distance sensor while driving , if within distaince, 10 cm, want stop. foresee possible need emergency stop. possible safely connect 1 of digital pins on sensor reading controller (an arduino micro) , have write pin, each iteration of loop on motor controlling arduino (a mega 2560 r3) read output of sensor arduino on 1 of digital pins , call sudden halt?

note not asking coding advice here, want make sure not fry micro controllers or pc connected via usb cable.

essentially goal cut down on latency of communications between sensor controller , motor controller. if it's not possible electrically not it.

thanks,
brian

as long output pin on 1 arduino connected input pin on other, ok.

connecting 2 outputs problem because if 1 writes high , other writes low, excessive current flow.

(it's ok connect 2 inputs together.)


Arduino Forum > Using Arduino > Project Guidance > Two Arduinos connected through digital pins?


arduino

Comments