I have managed to integrate other sensors on my ROV through the method below.
Would be great to hear peoples thoughts or suggestions on how to improve it.
More than happy to elaborate on anything i have done!
Our method inputs all additional sensors through an Arduino to take advantage of its analogue ports and ease of use.
- Attach sensor to Arduino and Create script to serial print data
- Download Putty to enable connection of raspberry pi and computer http://www.putty.org/
Open putty window and in logging, ensure “all session output” and browse location to which data is stored.
Power on ROV and connect to topside PC. To access the raspberry pi, enter its IP address (192.168.2.2) as host name and open.
In putty command terminal, enter the user name (pi) and password (raspberry) to access raspberry pi.
- Create new python script on raspberry pi
sudo nano scriptname.py
To read com port the script below was used
ser = serial.Serial(’/dev/ttyACM1’, 9600)
while 1 :
- Turn off power to ROV. Remove the USB connection from pixhawk and insert into top left serial port as this is automatically designated ACM0 which will be required for pixhawk communication. Any remaining serial port can be used for Arduino connection and should automatically be designated ACM1.
- Turn on ROV and again access the onboard raspberry pi via putty. Run command
Sensor data should now be being displayed in putty terminal even when Qgroundcontrol is running.
• Linking sensor power to main battery
• Fitting in and attaching the additional sensor and electronics
• Using acquired data for feedback controls of ROV