Our Software Architecture
Our Kinetic Cloud contains seven Arduinos: six Arduino Nanos and one Arduino Uno. Each of the six Arduino Nanos controls four motors and are slaves to the master Arduino Uno. The master Arduino dictates to the slaves what positions each motor should go to and each slave Arduinos then figures out how to step each motor. We used an I2C bus to communicate between the Arduinos.
As previously stated, our I2C system has one master and six slaves. Initially, we were considering using IO expanders to control our array of motors. However, after some quick calculations, we came to the conclusion that we would not be able to send messages over our bus fast enough to step our motors at a satisfactory speed. For this reason, we pivoted and decided to go with the master-slave system we have now. Since we are only sending position data over the bus and letting the slaves carry out the actual motor stepping, our bus is more than able to handle the communication load.
Weather StatesOur master Arduino has four programmed weather states: Sunny, Partly Cloudy, Cloudy, and Rainy. Each of these are represented by a 6x4 array where each indices' value is the position of a ball. A laptop uses the OpenWeatherMap API in a python script to get the current weather and sends a value representing that weather condition over serial communication to the master Arduino. The master Arduino then send the corrisponding positional information to the slaves which in turn steps the motors to the correct formation. External API Used: https://openweathermap.org/api
If you would like to learn more about our software, you can visit our github pageat the following link: https://github.com/camillexue/SmartCloud. If you would like to contact us for further information, use the information in our About Us page.