pwoosam / rov-lb Goto Github PK
View Code? Open in Web Editor NEWEAT Society's ROV control software
EAT Society's ROV control software
We need documentation to describe how to use the custom classes in our code and how to use them. We also need documentation to describe how messages are passed from Pi to Arduino and vice-versa over I2C.
I have only implemented the elevator thruster (The one that goes up and down). We still need the left and right thrusters to be implemented so that we can send messages to them from the Pi and get them moving. Implementation of the left and right thrusters should be almost identical to my implementation of the elevator thruster.
Here are some examples of messages to the Arduino that move the elevator thruster. The left and right thrusters should be similar.
from i2c_master import Arduino
ard = Arduino()
ard.send('255', register=0x10) # Move the elevator thruster up at full speed
ard.send('10', register=0x10) # Move the elevator thruster up at a slow speed
ard.send('0', register=0x10) # Turns off the elevator thruster
ard.send('-255', register=0x10) # Move the elevator thruster down at full speed
I would like to be able to move the left and right thrusters in a similar fashion.
For example:
ard.send('255', register=0x11) # Move the left thruster forward at full speed
ard.send('-255', register=0x12) # Move the right thruster backward at full speed
We need someone to write the readme for this project.
The README.md should contain:
Reading issue #3 will assist you in moving the thrusters. Although the left and right thrusters have not been implemented yet (not until issue #3 is resolved), you could probably figure out which messages and registers control which thrusters if you read issue #3.
We need to implement the following:
Button number | Function (while held down) | Motor movement |
---|---|---|
1 | Switch from slow to fast movement | none, just switches speed to high while depressed |
2 | Pivot left | left thruster reverse, right thruster forward |
3 | Pivot right | left thruster forward, right thruster reverse |
4 | Move forward | left thruster forward, right thruster forward |
5 | Move reverse | left thruster reverse, right thruster reverse |
6 | Descend | elevator thruster down |
7 | Ascend | elevator thruster up |
Since we already have Arduino to Pi communications down, we can write a Python script that reads buttons from the Pi's GPIO inputs.
See the documentation here for details on how to use the RPi.GPIO library for reading GPIO inputs on the Pi.
I would recommend using some code like this:
GPIO.add_event_detect(channel, GPIO.FALLING, callback=my_callback, bouncetime=200)
where channel is the GPIO pin the button is connected and my_callback is a function that checks if the button is still pressed. While the button is still pressed, the pi sends a message telling the arduino to do something. If the button is no longer pressed, then have the pi send a message telling the arduino to stop doing that thing.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.