need help getting serial flight control data to xbee

This forum is dedicated to all issues and questions related to your individual setups and configurations
Post Reply
nafix
Posts: 6
Joined: Tue Nov 13, 2012 8:11 pm

need help getting serial flight control data to xbee

Post by nafix »

What's up gentlemen,

I'm having big problems getting my board to respond to xbee communications. Here's my setup:
- Crius MultiWii SE, Hobbywing Skywalker 20A 2A-BEC Brushless ESC
- running modified Multiwii 1_9 software. I removed a lot code that wasn't relevant to my build did stuff to enable serial comm with xbee.
- I don't have a standard radio frequency controller/receiver. I have an XBEE connected to the rx/tx lines on the crius board.
- On the pc side, I have an xbox controller sending flight control commands to another xbee with a python script.

-I know that the atmega is receiving data in the proper manner in the serial routine. I set up an led to trigger when switch case is entered and lead by 'K'
-following the 'K' is 4 more bytes of control data (throttle, yaw, etc.) in the proper order.
-I transmit control data at 9600 baud and define the baud correctly in multiwii code (i know gui runs at different baud)
-I've calibrated escs. I also have a code build option, where i manually throttle the motors at startup

So I know the motors and esc are properly configured. I can manually throttle them in software with writeAllMotors(). The problem is that it seems the serial data is not being processed by the multiwii software.
Can someone check out my code and see if I'm missing something or tell me if the serial com routine is actually passing data down to the motor control level?
Will a bad acc or gyro calibration cause the motors to not be written to? Thanks in advance for any help.
Attachments
MultiWii_1_9.zip
my code build
(32.4 KiB) Downloaded 104 times

kharmine
Posts: 3
Joined: Fri Apr 05, 2013 2:15 am

Re: need help getting serial flight control data to xbee

Post by kharmine »

I'm in the process of setting up something very similar to this! My control board hasn't arrived yet though, so I can't help. I will keep you posted though.

In the mean time, may I ask why you've chosen to use MultiWii version 1.9? Is there a reason that you're not using a newer version?

User avatar
Hamburger
Posts: 2578
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: need help getting serial flight control data to xbee

Post by Hamburger »

nafix wrote:Will a bad acc or gyro calibration cause the motors to not be written to?

I would hope so!
Gyro gets callibrated at powerup (if copter is resting still).
ACC requires one manually triggered calibration at least once after flashing - gets stored in eeprom, so no need to repeat at powerup.

nafix
Posts: 6
Joined: Tue Nov 13, 2012 8:11 pm

Re: need help getting serial flight control data to xbee

Post by nafix »

Sorry I haven't posted back, I didn't think anyone was interested in this thread. Kharmine, have you had any success? I'm still stumped as to why I can't get quad flying with XBEE. I do have some theories. I'm using 1_9 mostly because I started with that. I don't know how the serial protocol works in the latest versions.

I have data reception in serial routine now with the XBEE. But the motors start doing this:
Throttle up, then throttle down, throttle up, throttle down. And motors are doing little stalls and twitching while this is going on.

Any ideas as to what this could be? Also, I have to manually force the arm variables to 1 to get the motors to work at all.
How would I go about disabling the sensors directly in the firmware? I don't want to start commenting stuff out and potentially breaking other things.

jellee
Posts: 3
Joined: Fri May 10, 2013 11:30 am

Re: need help getting serial flight control data to xbee

Post by jellee »

I think I asked a similar question at this post. But no answer yet
http://www.multiwii.com/forum/viewtopic.php?f=8&t=3540

crashlander
Posts: 506
Joined: Thu May 05, 2011 8:13 am
Location: Slovenia

Re: need help getting serial flight control data to xbee

Post by crashlander »

@jallee & nafix
I suggest you two read more in some later posts about serial control of MWII (probably nobody will remember about 1.9 since serial comm. was totally redesigned since than).
Most of those apply to any kind of serial communication (cable, APC802, XBee,....)

1. MSP basics: viewtopic.php?f=8&t=1516
2. Alexinparis version of fully blown TX with telemetry: viewtopic.php?f=8&t=3101
3. About direct computer control of MWII: viewtopic.php?f=8&t=3473
4. jallee my response to you from 10th of May (it seems you posted in more than one thread) viewtopic.php?f=8&t=3541

Regards
Andrej

Post Reply