How cpsdrone/cps works
This repository is a collection of Arduino libraries and communication experiments for the CPS submarine project, not a single submarine application. The clearest end-to-end runtime path in the sampled code is a Raspberry Pi-side SPI client sending an instruction to an Arduino slave, which dispatches it and prepares a response. The README also describes camera streaming, but the tree contains no evident camera or streaming implementation. The graph preserves major library capabilities; several connections are omitted because their source was not sampled.
Main entry points: spi.cpp Host SPI Client · main.cpp Arduino SPI Slave · EthernetClient.cpp Ethernet Client · MQTTClient.h MQTT Client
Components 24
SPI Communication
- Host SPI Client
programs/communication_stuff/communication/lib/spi.cpp - SPI Interface
programs/communication_stuff/communication/lib/spi.h - Arduino SPI Slave
programs/communication_stuff/communication/arduino/src/main.cpp - Bounded Buffers
programs/communication_stuff/communication/arduino/lib/bounded.hpp - Slave Instructions
programs/communication_stuff/communication/arduino/lib/slave_instructions.hpp - Communication Examples
programs/communication_stuff/communication/example code/client.cpp
Sensing And Control
- LSM9DS1 Sensor
programs/MORE LIBRARIES/Adafruit_LSM9DS1-master/Adafruit_LSM9DS1.cpp - Sensor API
programs/MORE LIBRARIES/Adafruit_Sensor-master/Adafruit_Sensor.h - Temperature Probes
programs/LIBRARIES/DallasTemperature/DallasTemperature.cpp - PID Controller
programs/MORE LIBRARIES/Arduino-PID-Library-master/PID_v1.cpp - Kalman Filter
programs/MORE LIBRARIES/Kalman_Filter_Library-1.0.2/Kalman.cpp - Servo Output
programs/MORE LIBRARIES/Servo/src/avr/Servo.cpp - Robot Text Input
programs/MORE LIBRARIES/Robot_Control/src/utility/RobotTextManager.cpp
Networking
- Ethernet Client
programs/MORE LIBRARIES/Ethernet/src/EthernetClient.cpp - Ethernet Core
programs/MORE LIBRARIES/Ethernet/src/Ethernet.h - WiFi Client
programs/MORE LIBRARIES/WiFi/src/WiFiClient.cpp - WiFi Firmware Stack
programs/MORE LIBRARIES/WiFi/extras/wifiHD/src/main.c - MQTT Client
programs/MORE LIBRARIES/Temboo/src/utility/MQTTClient.h - MQTT Packets
programs/MORE LIBRARIES/Temboo/src/utility/MQTTPacket.h - Bridge HTTP Client
programs/MORE LIBRARIES/Bridge/src/HttpClient.cpp
Platform Interfaces
- Firmata Ethernet Stream
programs/MORE LIBRARIES/Firmata/utility/EthernetClientStream.h - GSM Client Provider
programs/MORE LIBRARIES/GSM/src/GSM3ShieldV1ClientProvider.cpp - MAX7456 Display
programs/MORE LIBRARIES/MAX7456/MAX7456.cpp
Other components
- Host Application
Connections 9
- Host Application → Host SPI Client: requests transfers
- Host SPI Client → Arduino SPI Slave: sends instructions
- Arduino SPI Slave → Bounded Buffers: uses buffers
programs/communication_stuff/communication/arduino/src/main.cpp - Arduino SPI Slave → Slave Instructions: dispatches instruction
programs/communication_stuff/communication/arduino/src/main.cpp - Host SPI Client → SPI Interface: implements interface
programs/communication_stuff/communication/lib/spi.cpp - Ethernet Client → Ethernet Core: uses socket API
programs/MORE LIBRARIES/Ethernet/src/EthernetClient.cpp - MQTT Client → MQTT Packets: uses packet types
programs/MORE LIBRARIES/Temboo/src/utility/MQTTClient.h - Bridge HTTP Client → Host Application: exposes HTTP calls
- Firmata Ethernet Stream → Ethernet Client: wraps client
programs/MORE LIBRARIES/Firmata/utility/EthernetClientStream.h