HobbyKing.com New Products Flash Sale
Reply
Thread Tools
Old Feb 07, 2013, 12:37 PM
Registered User
Australia, NSW, Kiama
Joined Mar 2012
30 Posts
Thanks Hamburger
He has supported me very well in the past with setting up issues.
Just thought I would ask on the forum as I do with my other boards, I find I get a wider range of answers that I can work through
WIll send him an email
kiama is offline Find More Posts by kiama
Reply With Quote
Sign up now
to remove ads between posts
Old Feb 08, 2013, 12:08 PM
Registered User
Joined Jul 2011
56 Posts
so i know this isn't a tri. but quad x. loaded with multiwii 2.1 workds great on a tri... quad on the other hand... not so much. can't get off the ground with out it trying to flip itself over. any ideas?
planerazy03 is offline Find More Posts by planerazy03
Reply With Quote
Old Feb 08, 2013, 12:12 PM
MultiCopterPilot & Film Maker
crazyj's Avatar
United States, CA, San Ramon
Joined Oct 2002
2,540 Posts
Quote:
Originally Posted by planerazy03 View Post
so i know this isn't a tri. but quad x. loaded with multiwii 2.1 workds great on a tri... quad on the other hand... not so much. can't get off the ground with out it trying to flip itself over. any ideas?
Are the props spinning the correct direction, are the motors plugged into the correct ports? Did you flash the clear EEPROM before uploading 2.1?
crazyj is offline Find More Posts by crazyj
Reply With Quote
Old Feb 08, 2013, 12:17 PM
Registered User
Joined Jul 2011
56 Posts
Quote:
Originally Posted by crazyj View Post
Are the props spinning the correct direction, are the motors plugged into the correct ports? Did you flash the clear EEPROM before uploading 2.1?
Yes, Yes, and Yes. tried it 2wice. lol
planerazy03 is offline Find More Posts by planerazy03
Reply With Quote
Old Feb 08, 2013, 12:25 PM
Registered User
Joined Jul 2011
56 Posts
Quote:
Originally Posted by planerazy03 View Post
Yes, Yes, and Yes. tried it 2wice. lol

used this code to flash eeprom..


/*
* EEPROM Clear
*
* Sets all of the bytes of the EEPROM to 0.
* This example code is in the public domain.

*/

#include <EEPROM.h>

void setup()
{
// write a 0 to all 512 bytes of the EEPROM
for (int i = 0; i < 512; i++)
EEPROM.write(i, 0);

// turn the LED on when we're done
digitalWrite(13, HIGH);
}

void loop()
{
}
planerazy03 is offline Find More Posts by planerazy03
Reply With Quote
Old Feb 09, 2013, 03:17 PM
Registered User
Freakazoid's Avatar
Roosendaal, Netherlands
Joined Dec 2004
2,770 Posts
My question got snowed under last time, so ill try again:

I want to get pin A2 to control my LEDs by toggling between 1950 and 1050,
and I would like to butcher the camera trigger function to achieve this.

Taking the original code in output:
Code:
  #if defined(CAMTRIG)
    static uint8_t camCycle = 0;
    static uint8_t camState = 0;
    static uint32_t camTime = 0;
    if (camCycle==1) {
      if (camState == 0) {
        servo[2] = CAM_SERVO_HIGH;
        camState = 1;
        camTime = millis();
      } else if (camState == 1) {
       if ( (millis() - camTime) > CAM_TIME_HIGH ) {
         servo[2] = CAM_SERVO_LOW;
         camState = 2;
         camTime = millis();
       }
      } else { //camState ==2
       if ( (millis() - camTime) > CAM_TIME_LOW ) {
         camState = 0;
         camCycle = 0;
       }
      }
    }
    if (rcOptions[BOXCAMTRIG]) camCycle=1;
  #endif
..and changing it into:
Code:
  #if defined(CAMTRIG)
    if (rcOptions[BOXCAMTRIG]) servo[2] = 1950;
    else servo[2] = 1050;
  #endif
..and then defining CAMTRIG in config.h and assigning an AUX channel to that function in multiwiiconf should do the trick, right?
Freakazoid is offline Find More Posts by Freakazoid
Reply With Quote
Old Feb 09, 2013, 07:51 PM
Suspended Account
Joined Jun 2012
988 Posts
Quote:
Originally Posted by Freakazoid View Post
My question got snowed under last time, so ill try again:

I want to get pin A2 to control my LEDs by toggling between 1950 and 1050,
and I would like to butcher the camera trigger function to achieve this.

Taking the original code in output:
Code:
  #if defined(CAMTRIG)
    static uint8_t camCycle = 0;
    static uint8_t camState = 0;
    static uint32_t camTime = 0;
    if (camCycle==1) {
      if (camState == 0) {
        servo[2] = CAM_SERVO_HIGH;
        camState = 1;
        camTime = millis();
      } else if (camState == 1) {
       if ( (millis() - camTime) > CAM_TIME_HIGH ) {
         servo[2] = CAM_SERVO_LOW;
         camState = 2;
         camTime = millis();
       }
      } else { //camState ==2
       if ( (millis() - camTime) > CAM_TIME_LOW ) {
         camState = 0;
         camCycle = 0;
       }
      }
    }
    if (rcOptions[BOXCAMTRIG]) camCycle=1;
  #endif
..and changing it into:
Code:
  #if defined(CAMTRIG)
    if (rcOptions[BOXCAMTRIG]) servo[2] = 1950;
    else servo[2] = 1050;
  #endif
..and then defining CAMTRIG in config.h and assigning an AUX channel to that function in multiwiiconf should do the trick, right?
you just want to switch lights on and off?

http://www.hobbyking.com/hobbyking/s...d_Switch_.html

or do you want to switch up to 9 different sets of lights on and off?

http://www.hobbyking.com/hobbyking/s...f_Switch_.html
neobot is offline Find More Posts by neobot
Reply With Quote  (Disabled)
Old Feb 10, 2013, 01:42 AM
Registered User
BadBert's Avatar
Nederland, Noord-Brabant, Hoogerheide
Joined Mar 2007
506 Posts
He wants to use his fc for it......
BadBert is offline Find More Posts by BadBert
Reply With Quote
Old Feb 10, 2013, 02:43 AM
Registered User
Freakazoid's Avatar
Roosendaal, Netherlands
Joined Dec 2004
2,770 Posts
Quote:
Originally Posted by neobot View Post
you just want to switch lights on and off?

http://www.hobbyking.com/hobbyking/s...d_Switch_.html

or do you want to switch up to 9 different sets of lights on and off?

http://www.hobbyking.com/hobbyking/s...f_Switch_.html
The LEDs ive got already have drivers on them. They respond to PWM signal, <1500 = off, >1500 = on.
So I gotta use that 3rd servo channel on the multiwii board to do it, since receiver is set to PPMsum.
Freakazoid is offline Find More Posts by Freakazoid
Reply With Quote
Old Feb 10, 2013, 04:47 AM
Registered User
Nederland, Gelderland, Meteren
Joined Dec 2010
202 Posts
You better ask your question on the MultiWii forum.
KeesvR is offline Find More Posts by KeesvR
Reply With Quote
Old Feb 10, 2013, 05:07 AM
Registered User
Freakazoid's Avatar
Roosendaal, Netherlands
Joined Dec 2004
2,770 Posts
I did, but it got even more ignored than here.

http://www.multiwii.com/forum/viewto...p=30850#p30850
Freakazoid is offline Find More Posts by Freakazoid
Reply With Quote
Old Feb 10, 2013, 07:54 AM
Registered User
rimshotcopter's Avatar
United States, CA, Los Angeles
Joined Aug 2009
11,575 Posts
May be they can not take a Joke? Hmmm.
rimshotcopter is online now Find More Posts by rimshotcopter
Reply With Quote
Old Feb 10, 2013, 08:43 AM
Suspended Account
Joined Jun 2012
988 Posts
Quote:
Originally Posted by Freakazoid View Post
The LEDs ive got already have drivers on them. They respond to PWM signal, <1500 = off, >1500 = on.
So I gotta use that 3rd servo channel on the multiwii board to do it, since receiver is set to PPMsum.
your using ppm-sum yea? how about link your lights to the gear channel of the rx?should switch on lights when flipping switch for auto level mode

or link to channel 6 on the rx and have lights switch on at center stick? need to be in heli mode though so you can adjust pitch trims and curve

in theory even though you are using ppm the other channels still do stuff from the rx right? so if you want you could link a light board like you have to aileron elevator rudder gear ch6 ch7 and have them all switch on at different times via your tx
neobot is offline Find More Posts by neobot
Reply With Quote  (Disabled)
Old Feb 10, 2013, 09:06 AM
Registered User
Freakazoid's Avatar
Roosendaal, Netherlands
Joined Dec 2004
2,770 Posts
Thats exactly what im trying to do, I want the AUX4 input to come directly out of A2 (trigger servo port).
Its normally just a 6ch receiver, but through PPMsum I get 8 channels.
Im already using channel 5 to arm and channel 6 to activate levelmode, so now I want to use 7 to toggle my lights.
Yes my RX has channels 1~5 still functioning (6 is PPMsum), but no I cannot use them anymore.
You can see why, in this picture:



The black thing underneath the afromini is my reciever. 32x16x3mm and 2 grams.
I removed all pins, soldered a wire with a connector to the PPM port and shrinkwrapped it.
So you see, I HAVE to go through the multiwii firmware to get it working.

And instead of just looping AUX4 to A2 "blind" in the firmware I think its nicer to redefine a function I dont plan on using.
So thats why im trying to convert camtrigger to a simple on/off switch.

Will my code hack work though? Or am I just going to have to try and see what happens?
Freakazoid is offline Find More Posts by Freakazoid
Reply With Quote
Old Feb 10, 2013, 10:33 AM
DiaLFonZo - UAV/Drone
Dialfonzo's Avatar
Canada, QC
Joined Oct 2007
6,718 Posts
Quote:
Originally Posted by Freakazoid View Post
Thats exactly what im trying to do, I want the AUX4 input to come directly out of A2 (trigger servo port).
Its normally just a 6ch receiver, but through PPMsum I get 8 channels.
Im already using channel 5 to arm and channel 6 to activate levelmode, so now I want to use 7 to toggle my lights.
Yes my RX has channels 1~5 still functioning (6 is PPMsum), but no I cannot use them anymore.
You can see why, in this picture:

[]http://static.rcgroups.net/forums/attachments/5/0/2/9/2/a5415467-88-IMG_2434.jpg[/img]

The black thing underneath the afromini is my reciever. 32x16x3mm and 2 grams.
I removed all pins, soldered a wire with a connector to the PPM port and shrinkwrapped it.
So you see, I HAVE to go through the multiwii firmware to get it working.

And instead of just looping AUX4 to A2 "blind" in the firmware I think its nicer to redefine a function I dont plan on using.
So thats why im trying to convert camtrigger to a simple on/off switch.

Will my code hack work though? Or am I just going to have to try and see what happens?
You want to make it work on the afromini or another board ?
Cause you can't edit the code on the afromini just like a normal MultiWii board.. no ?
Dialfonzo is offline Find More Posts by Dialfonzo
RCG Plus Member
Latest blog entry: DiaLFonZo-Copter - Announcement
Reply With Quote