Our robot uses three different sensors to keep an eye on its internal and external climate and other factors. The first sensor we use is the voltage sensor. This sensor constantly prints the onboard voltage of the robot. This sensor is connected to the same arduino as the pressure sensor. We use the pressure sensor to convert pressure data into depth data to measure the depth of the robot.
After we had an accident during a pool test where water leaked into our robot, we decided to add the temperature and humidity sensor. The robot uses this sensor to measure its internal temperature and humidity to detect any possible leakages. The sensor is connected to the same Arduino as the torpedo servo. For the torpedo servo, we use a servo that is encased in a water tight case.
We refactored the code for collecting data from the Arduinos and sending it over serial to the ROS node. We created a parent class, so that we would only have one implementation of core serial functionality.