By the end of this section you'll be able to create a system that can send and receive messages between multiple Arduinos! In the picture below, one Arduino uses a keyboard and the serial monitor for its input and output. While the other uses a potentiometer, button, and the LCD display. This simple network is possible due to the extra Arduino and WiFi module included in the kit.
Gather the following parts to complete this project.
|Arduino With Base Shield||1|
|Ardunio Without Base Shield||1|
|RGB LCD display||1|
Lets go over the design requirements and constraints of our system.
- Two Arduino communication
- Acknowledgments when messages are received
- The ability to write messages and receive them at the same time
- Only one Arduino can use the base shield
- Only one Arduino can be using the Serial Monitor
- Both Arduinos need input and output systems
With our requirements and constraints laid out lets get to work sketching out the design. Each Arduino will need an input and output. For the one attached to the computer it is able to use the Serial Monitor. With the Serial Monitor we send messages as well as see them. This takes care of the inputs and outputs.
For the other Arduino, I've elected to use LCD Display to the output and a potentiometer and button for the general input. There are a few options we could have used the these. Such as, an LED blinking Morse code as the output or perhaps using many buttons as the input. Feel free to experiment and try your own solutions.
Starting with the Arduino without the base shield. Take a cable and unwrap it. Plug one side into the WiFi Module and the other into one of the I2C sockets found natively on the Arduino. We can set that one aside.
Now grab the remaining Arduino with the base shield attached. Take a cable and unwrap it. Plug one side into the WiFi Module and the other into D8.
Take a cable and unwrap it. Plug one side into the button module and the other into D4. Take the another cable and unwrap it. Plug one side into the potentiometer module and the other into A0. Take the last cable and unwrap it. Plug one side into the LCD DIsplay and the other into any I2C.