Can anyone here write a simple program like this - SEE: Marine Autopilot - #11 by Coding_Badly
That is not particularly difficult, and there is nothing special about "marine". A number of examples have been written and posted as open source, e.g. Ardupilot (a very sophisticated example).
Code written for a ground vehicle differs mostly in the steering mechanism and could easily be adapted to a boat.
If you want someone someone to do that for pay, use the flag button below to ask a moderator to move your post to the Jobs & Paid Collaborations forum section.
Yes anyone can and is welcome to share
It's rare that a land vehicle moves if you stop the engine and puts the breaks on for example, it's not unheard of for a boat ➜ you probably need to pay more attention to the effects of winds / current. (if you have a very crude code)
What do you mean, "like this"? Why can't you just use one of the ones already there?
Not everyone, but some here could do that.
All answers here are guessing about the meaning and background of your question.
Can anyone here write a simple marine autopilot program?
this question is contradictory between the words simple and autopilot
It is not simple in the sense of write 20 or 30 lines of code.
It will require much more lines of code.
additionally with that small base of information and without writing a summary of what you know and what equipment you have
it is no longer "simple"
because you load all the detail-work on your potential helpers
either reading this other thread and start to pick out the required details from there
or
work starting with asking back for these details
- what equipment do you have?
- what is the interface to transform auto-piloting commands into actions of physical components to
- control what kind of marine "thing"?
- and many many more detail questions
best regards Stefan
it could be. He said "auto-pilot" not "smart pilot".. just randomly changing direction would fit the spec... it's automatic
I gave a link to the video. Is it blocked? Here goes again. RC and autopilot SUP rudder - YouTube
I linked to a YT video. I just need a code for THIS kind of Gizmo. I'd pay $100.00 for the code and Wiring Diagram. SEE video RC and autopilot SUP rudder - YouTube
If you use a cheap magnetometer here is a this simple code (below)
Build the whole autopilot for $30.00 or less
.
SEE VIDEO - RC and autopilot SUP rudder - YouTube
(NOTE; For 'Set-Path' Button just wire ground (-) to RESET pin, simple)
CODE:
#include <Wire.h>
#include <MechaQMC5883.h>
#include <Servo.h>
MechaQMC5883 qmc;
Servo myServo;
int setpath = 100; //Defines Direction
int temp = 0;
int temp2 = 0;
void setup()
{
myServo.attach(8);
Wire.begin();
qmc.init();
Serial.begin(9600);
}
void loop()
{
int x, y, z, azimuth;
qmc.read(&x, &y, &z,&azimuth);
Serial.print("raw input: ");
Serial.print(azimuth);
delay(100);
temp = azimuth - setpath;
temp2 = 90 + temp ;
myServo.write(temp2);
Serial.print(" servo: ");
Serial.print(temp2);
Serial.println();
}
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.