Hi,
I have Arduino Mega 2560 and Arduino Uno. I wish to connect this two Arduino together. Is it possible ?
Hi,
I have Arduino Mega 2560 and Arduino Uno. I wish to connect this two Arduino together. Is it possible ?
Sure it is, you have several options to do this: UART, I2C and SPI in hardware, you can use parallel transfers with 8 wires, you can use Ethernet shields to connect them by LAN, etc.
You have to specify what you need it for and what you wanna transfer in what time.
pylon:
Sure it is, you have several options to do this: UART, I2C and SPI in hardware, you can use parallel transfers with 8 wires, you can use Ethernet shields to connect them by LAN, etc.You have to specify what you need it for and what you wanna transfer in what time.
Thanks for the guidance. I wish to connect 5 adxl 335 accelerometers to Arduino Mega and it consumes to 16 Analog Input since 1 adxl 335 consists of X,Y and Z axis. In the same time, I wish to display the data on Arduino-Graphic LCD which mounts on Arduino which is Arduino Uno. I wish to ask is this possible ? Mind to give me guidance ?
Why don't you use the Mega for everything? You don't need an analog port for the display (BTW, which display are you using?).
If you wanna use both, what will be the distance of the two boards?
pylon:
Why don't you use the Mega for everything? You don't need an analog port for the display (BTW, which display are you using?).If you wanna use both, what will be the distance of the two boards?
Thanks for the reply ! There are insufficient analog input if I use Mega only. This is due to I use five adxl335 accelerometers which consumes 15 analog input as Mega has only 16 analog input. While, I am using Arduino- Graphic LCD ( Cytron.io - Simplifying Digital Making ) which will consume 5 analog input. So it is insufficient analog input if I only use Mega only. So I am thinking to put Arduino- Graphic LCD on Uno while put 5 adxl 335 accelerometers on Mega. So there is no distance of the two boards.
I don't wanna convince you to change your project but the LCD you linked to uses one analog input to transmit the joystick value to the Arduino. One analog input is exactly what you still have on the Mega given the 5 sensors are still the only other thing connecting to it.
With the two boards next to each other I would also opt for the I2C as Murinto92 suggested. This gives you a fast interface and leaves the serial on the UNO free for debugging. Don't forget to connect the GNDs of the two Arduinos.
I might think about using the Mega as the main board, use one serial port for
debugging, and connecting it to the Uno UART via one of the secondary
UARTs. In general, RS232 comms is easier to implement for 2-way comms
than I2C or SPI, where one of the boards has to be used in slave mode.