I was dreaming of a flying machine like an insect: able to hover stably (triwii) and to fly long distances economically (plane).
Si here is the TRICOPLANE !
I need some help to change the code. I know some old 80's Basic... but C++
I'll use a PPM serial sum board to free Digital pin 4 5 6 7
4 and 5 will be used as Servo output to control Pitch and Roll in Plane mode.
6 and 7 will be used as AUX1 and AUX2 as analog inputs 1-2-3 are used by an ADXL335 surgically extracted from a WIImote. 2 NCK went into the garbage can (one with a MMA7660 the other with a MMA6661 acc).
I changed some value in the code to use the ADXL335
You can see this post http://wbb.multiwii.com/viewtopic.php?f=8&t=518
and this one : http://wbb.multiwii.com/viewtopic.php?f=6&t=521 regarding change to the MWII code.
To read the digital output values of the ADXL335 you may use the code given at the end of this post.
I hope this will help and contribute to bring solutions. Of course if I spend 150 bucks more I would not have to fumble around an ADXL335
And if I had many tousand buck I could hire someone to write and modify Alex's code for me
If someone can help me about this project coding... I'll really appreciate.
I need to use AUX2 to change the axis of the front motors and stop the rear motor and servo when the plane is beginning to fly.
Then Digital pin 4 and 5 will control the plane as a Pitch and Roll servo output.
_______________________________________
Code: Select all
//////////////////////////////////////////////////////////////////
//originally coded by 2011 bildr to gives angular values,
//Released under the MIT License - Please reuse change and share
//Simple code for the ADXL335, prints Digital values via serial
//////////////////////////////////////////////////////////////////
//Analog read pins
const int xPin = 1;
const int yPin = 2;
const int zPin = 3;
// minimum and maximum values that come from
//the accelerometer while standing still, Y axis get 1G this is the value to read
void setup(){
Serial.begin(9600);
}
void loop(){
//read the analog values from the accelerometer
int xRead = analogRead(xPin);
int yRead = analogRead(yPin);
int zRead = analogRead(zPin);
//Output the value
Serial.print("x: ");
Serial.print(xRead);
Serial.print(" | y: ");
Serial.print(yRead);
Serial.print(" | z: ");
Serial.println(zRead);
delay(400);//just here to slow down the serial output - Easier to read
}
________________________________________________