Software Design - Arduino <-> Raspberry Pi Interfacing - Arduino Communication Protocol

Moving onto the Arduino communication protocol, the following data package is sent back to the Raspberry Pi, upon receiving a command package.


To keep everything consistent, there are 10 floats sent between the Arduino and the RPi. Only 5 out of the 10 floats in the data packet are populated, after a certain actuation or reading is conducted. First, the state of the garage door (i.e. opening or closing) is recorded, as well as the state of the trap door. Three floats correspond to sensor readings, including the pH sensor value, the conductivity sensor value and the ultrasonic sensor voltage values (recommending whether the filter should be cleaned out).

It is important to note that the RPi decides what routine step it is on, and then builds its command packet to be sent to the Arduino. Once the Arduino obtains this command packet, and conducts the required polling and actuations, the data packet is sent back to the RPi. The RPi then logs any important data on the Firestore database, for the farmer to view.

Comments

Popular posts from this blog

Mechanical Design - Watertight Locking Mechanism

Final Post (Poster, Video)

Software Development - Making Lilypod Intelligent – Part 3 (The Implementation)