Search found 4 matches

by wetzel
Thu Jul 09, 2015 9:34 am
Forum: Software development
Topic: Sonar HC-SR04 Support now implemented in MW2.4
Replies: 102
Views: 76239

Re: Sonar HC-SR04 Support now implemented in MW2.4

Yes i got the Same issue like you. HC-SR04 isn't able to detect distance between 0-2 cm. So i made a small change in The Code, and i will test it at weekend. The Change did something like they trying to do here // limit sonar altitude /*if (sonarAlt > SONAR_MAX_HOLD) { sonarAlt = SONAR_MAX_HOLD; }*/...
by wetzel
Mon Jun 29, 2015 1:58 pm
Forum: Software development
Topic: Sonar HC-SR04 Support now implemented in MW2.4
Replies: 102
Views: 76239

Re: Sonar HC-SR04 Support now implemented in MW2.4

Hi wetzel, Glad this code works for you. Have you tested ALT Hold above sonar range? Did you solve the Problem with the Full Throttle issue up to 4xx cm? There is might be a logical issue in the Code. I can't see anything that is preventing from the situation, that Sonar Value is 0 an the Copter is...
by wetzel
Mon Jun 29, 2015 12:44 pm
Forum: Software development
Topic: Sonar HC-SR04 Support now implemented in MW2.4
Replies: 102
Views: 76239

Re: Sonar HC-SR04 Support now implemented in MW2.4

Have you tested ALT Hold above sonar range?


Hey ItsOnlyMe,

no i haven't tested it.
But i will and post the result ;)
Above 400cm the Code uses only the Baro,i think it should work.
by wetzel
Mon Jun 29, 2015 8:45 am
Forum: Software development
Topic: Sonar HC-SR04 Support now implemented in MW2.4
Replies: 102
Views: 76239

Re: Sonar HC-SR04 Support now implemented in MW2.4

I've modify in the config.h #define SONAR_GENERIC_TRIGGER_PIN 9 // motor 12 #define SONAR_GENERIC_ECHO_PIN 10 // motor 11 and in the def.h i edit this entry #define SONAR_GEP_TriggerPin_PIN_HIGH PORTH |= 1<<6; // WAS: PORTB |= 1<<6; #define SONAR_GEP_TriggerPin_PIN_LOW PORTH &= ~(1<<6); // WAS:...