Depending on where you live the analogies might not be accurate... i am only driving a very short distance, less than 20meters at the maximum, similar to driving to your letterbox from the garage door and back.
ex-Gooserider wrote:Personally I've never liked working with Fritzing - even when using breadboards....
If you want to get into making your own, I'd look seriously at KiCAD - free software, specifically designed for electronics drawing, starting from a schematic and going to complete multi-layer board layout... A lot of the development work on it is done and / or funded by the atom smashing folks over at CERN.... We have several professional board designers at the Asylum, and they tell me that KiCad is comparable in functionality to some of the multi-thousand dollar / seat commercial packages like Altium....
ex-Gooserider
float targetCourse = gps.gprmc_course_to(storedLat, storedLong);
float currentCourse = "input from compass chip"
if (targetCourse > 180)
{
if (currentCourse > targetCourse) { // current is between 360 & target but target > 180
turn counterClockWise();
}
else if (currentCourse < targetCourse) && (currentCourse < targetCourse - 180) { //current is 0-180 target >180
turn counterClockWise();
}
else if (currentCourse < targetCourse) && (currentCourse > 180) { // current is > 180 but < target
turn clockWise();
}
}
if (targetCourse < 180) {
if (currentCourse < targetCourse) { //current 0-target
turn clockWise();
}
else if (currentCourse > targetCourse + 180) { // current > target +180
turn clockWise();
}
else if (currentCourse > targetCourse) { // current > target but less than 180
turn counterClockWise();
}
steer = gps.gprmc_course_to(storedLat, storedLong) - (heading Degrees)
if (steer < 0) { steer += 360;}
if (d > 180) { steer -= 360; }
if (steer <= -20 && steer >= -180)
{
digitalWrite(left, LOW);
digitalWrite(right, HIGH);
}
else if (steer >= 20 && steer <= 180)
{
digitalWrite(left, HIGH);
digitalWrite(right, LOW);
}
else
{
digitalWrite(left, HIGH);
digitalWrite(right, HIGH);
}
steer = gps.gprmc_course_to(storedLat, storedLong) - (heading Degrees)
woodygb wrote:Question ...Does the motor rotate 360 degrees to get reverse?
void steering() {
// calculate relative direction to destination
int steer = gps.gprmc_course_to(storedLat, storedLong) - (currentCourse) ;
// check if negative number, turn into positive.
if (steer < 0) {
steer += 360;
}
if (steer > 180) {
steer -= 360;
}
Serial.print("CTD used for relay control - ");
Serial.print(steer);
Serial.println();
//Turn left
if (steer <= -20 && steer >= -180)
{
digitalWrite(left, LOW);
digitalWrite(right, HIGH);
}
else if (steer >= 20 && steer <= 180)
{
digitalWrite(left, HIGH);
digitalWrite(right, LOW);
}
else
{
digitalWrite(left, HIGH);
digitalWrite(right, HIGH);
}
}
LROBBINS wrote:Have you tuned the motor compensation? If too low, it will have trouble with "high load" situations, including turn-in-place. Careful though, too high and the chair can become unmanageable, even to the point of runaway behavior.
Burgerman wrote:It makes it easier to drive. The load compensation when set correctly, automatically compensates for load. So the chair will respond the same, either loaded or not, slope or not, grass or tarmac, hill or no hill.
When its not set high enough you must add more power to overcome a load or weight yourself, and then it runs away after you do it. Or it refuses to turn. When set even fractionally too high it over compensates and can run away.
Return to Everything Powerchair
Users browsing this forum: acid_coke, emilevirus, tettralytic and 183 guests