Sculli's Architecture
Below you can find a diagram and explanation of how Sculli's hardware and software components interact to form the basic system thus far.
Components
Users: Anyone or any thing wanting to actuate the robot's servos. This can and will include other portion of the robot itself trying to actuate itself.
API: Application Programming Interface written in Python and using Flask to provide the web interface to generate commands to be sent.
Database: Repository holding commands waiting to be sent as well as all commands sent.
Agent: Python script written to monitor the database and send commands when a new command is found waiting to be sent to the Arduino.
Arduino: Microcontroller running the Sculli firmware to accept command messages from the Serial port and actuate all servos simultaneously in real time.
Servo: Mechanical device responsible for creating movement of physical components based on electronic signal input.
Process Description
Users make a GET call (will be refactored to POST eventually) to Flask server running the API.
The API stores the command in the database with the processed flag set to 0.
The Connection Agent running via the Python script constantly monitors the database for records with the processed flag set to 0.
When a command is detected in the database with a processed flag set to 0, the agent will transmit the command out the Serial port to the Arduino, and update the database with the command's processed flag set to 1.
The firmware running on the Arduino receives the command and sets the target of the specified servo to the desired location, initiating movement.