Hi everybody ! Hope everyone is safe and well.
This weekend I went back to my original design and finally I was able to do some communication between the Arduino MKR 1300 WAN and the UNO.
Arduino Communication
UART / Serial
After several days attempting to send data from the MKR 1300 WAN to UNO using UART, I had no success.UART stands for Universal Asynchronous Receiver/Transmitter. It is a hardware device (or circuit) used for serial communication between two devices, in this case, two Arduinos.
I'm guessing that one of the problems is that the Arduino MKR 1300 WAN has two serial ports - serial and serial1 . Serial for USB and Serial1 for UART. I did try with serial1, but no luck.
I2C
Enter I2C protocol. After trying other options, and a lucky search, I tried I2C . I didn't knew we could do this. Yes, I know my knowledge of hardware is very limited to Arduino basic functions other stuff. This protocols are not new to me - I know a lot of sensors use I2C to communicate with the Arduino. I'm a software guy .
And, with I2C, it finally worked. I have all 3 Arduinos talking and sharing information.
Here's the new schematic
The data collecting Arduino gathers data and sends it to the other Arduino MKR 1300 WAN. This one receives the data and sends it - using I2C - to the Arduino UNO, that uses the Grove system to display the values on the Grove-LCD RGB backlight.
In a previous post, I've already shown the data transfer between both Arduinos. Now, I've introduced the data exchange between the MKR 1300 WAN and the UNO.
Here are screenshots of the three Arduinos communicating (I have two monitors, so the image is wide).
And some photos of the data on the LCD.
I've already programmed the LCD to change color if the values are not within safe values. Here's an example for the TDS values and battery values - and the color changed when the battery values are safe.
Next steps
Data collecting
The next step is deep sleep the data collecting Arduino - I don't need to be constantly collecting data. Sleeping and waking up every 4 hours will be enough.
After that, is placing the enclosure outside and start collecting.
Data receiving
On this end, I just need to probably clean up the code.
Grove UNO
On the UNO, just place it in the support and try the WiFi - this one uses Serial, but the Grove documentation is very poor.
Happy programming.