AeroQuad with Teensy 3.1

Status
Not open for further replies.
Thank you for quick response. I will try it...
Another problem - PPM Receiver with CT6B - 6 channel system (http://www.hobbypartz.com/79p-ct6b-r6b-radiosystem.html).
With Arduino Mini I have been using Receiver_328p.h but I think it is not compatible with Teensy. (https://code.google.com/p/aeroquad/...l/Libraries/AQ_Receiver/Receiver_328p.h?r=918)
Receiver_PPM.h looks better but it is not working. I am not sure which pin should be on line 27 (attachInterrupt) and which 6 pins can I use as input. (http://code.google.com/p/aeroquad/s..._C/Libraries/AQ_Receiver/Receiver_PPM.h?r=897)

Thank you
 
Not working correctly


I tried it, but it does not work properly. myIn.available() is always 0. I tried to debug it (I have inserted Serial.println(String(count) + ">=" + String(RX_MINIMUM_SPACE_CLOCKS)); to line 331 in PulsePosition.cpp) and this is result:
34525>=168000
34533>=168000
100119>=168000
34477>=168000
100125>=168000
34534>=168000
100068>=168000
34485>=168000
100125>=168000
34506>=168000
100088>=168000

So I changed RX_MINIMUM_SPACE to 2000. After that I have some results in myIn.Read():

718.52
718.44
718.50
717.81
717.56
724.65
763.42
763.33
708.46
770.94
755.15
732.27
735.04
719.69
718.54

But I looks like that it detects only change - default value is around 718. When I move transmitter stick to the right then value raised up to 770, but then it drops down to 718 even if I hold the stick on the right side. Is this correct behavior ?

Thx
 
Solved

I took a quick look. It seems pretty simple.

Please give this modified copy a try.

https://github.com/PaulStoffregen/AeroQuad/blob/master/Libraries/AQ_Motors/Motors_PWM.h

Please let me know if this solves the problem. If so, I'll send a pull request to AeroQuad.

Hi, I have tested it and you need 2 corrections to motors work correctly:

1) in Motors_PWM.h: with #define EIGHT_HARDWARE_PWM you will not set motor pins to OUTPUT mode in initializeMotors method. I think pinMode(MOTORPIN, OUTPUT) should also be in block #ifdef EIGHT_HARDWARE_PWM in method initializeMotors

2) in SerialCom.h: in method validateCalibrateCommand is condition "readFloatSerial() == 123.45". This is always false in Teensy 3.1. There should be "abs(readFloatSerial() - 123.45) < 0.01"
 
Hi, I have tested it and you need 2 corrections to motors work correctly:

1) in Motors_PWM.h: with #define EIGHT_HARDWARE_PWM you will not set motor pins to OUTPUT mode in initializeMotors method. I think pinMode(MOTORPIN, OUTPUT) should also be in block #ifdef EIGHT_HARDWARE_PWM in method initializeMotors

The analogWrite() function set the pin mode automatically.

2) in SerialCom.h: in method validateCalibrateCommand is condition "readFloatSerial() == 123.45". This is always false in Teensy 3.1. There should be "abs(readFloatSerial() - 123.45) < 0.01"


I don't see SerialCom.h anywhere inside AQ_Motors. Maybe you're talking about other code?


I'm guessing this fix isn't yet something that can be contributed back to AeroQuad....
 
Status
Not open for further replies.
Back
Top