Skip to content

ftkare/TEKNOFEST_SUBMARINE

Repository files navigation

Submarine codes for Teknofest

The code base for our submarine project.

Friendly Advice

Avoid looking at motors.cpp

Dependencies

  • OpenCV: libopencv-dev, python3-opencv etc.
  • Tkinter: python3-tk
  • Pillow: Pillow (PyPI)
  • Boost: libboost-all-dev
  • WiringPI: https://github.com/WiringPi/WiringPi/ (only on Raspberry PI)

Running the project

Running the submarine controller:

#Enter build directory
cd build

# Generate the build files (do once unless you added some new files)
# If you are on raspberry PI do this
cmake -D COMPILE_DEFINITIONS=RASPBERRY_PI ..
# If you are not on raspberry PI do this instead
cmake ..

# Build the system (do once unless you changed some files)
make
# Make sure:
#   * The Arduino is plugged into your system
#   * Port (generally ttyUSB[0-9] or ttyACM[0-9] on linux and COM[0-9] on windows) is not being used by anything else (Close Arduino IDE, for example)
# Then run the controller:
./ControlSubmarine

IMPORTANT - coding style for this project

  • Avoid editing even a single character without asking us if your first name starts with the letter "Doruk".
  • Avoid using namespace statements but namespace x = ... is OK as long as you know what you're doing and it helps the code to be more readable.
  • Avoid programmatically exiting the program.
  • Class declarations and implementations should be in different files.
  • Please document lines which include following:
    • Binary operations, also called "bit magic"
    • Excessive and unreadable use of operators
    • Obscure function calls
  • Do not call other systems' methods inside one another. All connections should be handled in the main file.
  • For the UDP communication, I plan to pack everything to a single set-size array and unpack it on the other side so connection can be easily reloaded from last state because every package is alike.
  • Use tabs for indentation, make sure the code is as readable as possible. Use a formatter if possible.

Definitions

UDP Package

Part Size
Gyroscope X 4
Gyroscope Y 4
Gyroscope Z 4
Depth 4
Frame 62208

TODO

  • Connect the systems
  • Implement multithreading
  • Implement motor control (Has to be tested in Raspberry PI)
    • Handle GPIO pins
  • Write the code for arduino

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors