top of page
Ocean

Highlighting Functions

Having multiple systems communicate and function properly together means relying on well made code. Below are three functions that play a vital role in the operation of our ROV. 

​

See all of our code on our Github page.

Packet Parser Function

Our control data packet is comprised of multiple points of data. These values are associated with buttons on the PS3 controller that are mapped to control areas such as orientation, position and depth. All of these control values are combined into our packet. Below is a demo packet (Spaces are for clarity, not included in real packet).

​

#99 000 000 000 000 000 000 0 0 0 0 0 0 999#

​

Our packet parser reads the received packet and divides it into segments corresponding to each button value. These values are then used to control the ROV.

Pressure Sensor Function

The ROV has a pressure/temp sensor that communicates using I2C. Using this sensor, we are able to calculate the current depth of the ROV, the water pressure, and the temperature. 

​

​

Motor Control Function

The 6 motors are individually controlled using ESCs. These ESCs vary the speed and direction of the motors based on a PWM signal sent from the STM32 chip. This function is responsible for reading the corresponding user input value, and using that value to create a PWM signal. The duty-cycle of this signal changes the speed and direction of the motors and a duty-cycle of 50% stops the motors.

©2022 by Walrus ROV @Jason King

Walrus ROV would like to thank Camosun College for its support, Camosun Innovates for supplying us with the ROV and additional supplies, as well as the multiple instructors that have been valuable throughout the term.

bottom of page