SMALL - espritmodel.com SMALL - Telemetry SMALL - Radio
Reply
Thread Tools
Old Sep 15, 2012, 10:59 AM
Advanced Monkey
nebstress's Avatar
United Kingdom, England
Joined Nov 2011
1,605 Posts
Quote:
Originally Posted by Endlesslag View Post
Where does that code go? I tried it at the top, bottom, and with the GPS stuff and it won't compile with the initialization code in it.
It needs to be pasted in the "Serial GPS only variables" section, here is a copy of mine, the code you need to add is in blue.

Code:
  calibratingG = 400;
  #if defined(POWERMETER)
    for(uint8_t i=0;i<=PMOTOR_SUM;i++)
      pMeter[i]=0;
  #endif
  #if defined(ARMEDTIMEWARNING)
    ArmedTimeWarningMicroSeconds = (ARMEDTIMEWARNING *1000000);
  #endif
  /************************************/
   
#if defined(GPS_SERIAL)
 
  #if defined(UBLOX)
   UBLOX_init();
   delay(200);
  #endif

#if defined(MTK)
   MTK_init();
   delay(200);
#endif

    SerialOpen(GPS_SERIAL,GPS_BAUD);
nebstress is offline Find More Posts by nebstress
Reply With Quote
Sign up now
to remove ads between posts
Old Sep 15, 2012, 11:38 AM
Registered User
United Kingdom, Scotland, Aberdeen
Joined Mar 2010
802 Posts
For a old numpty

Do you just type that details in as per the way you have type it,many thank's,Marty.
NEAGRON is online now Find More Posts by NEAGRON
Reply With Quote
Old Sep 15, 2012, 12:10 PM
Registered User
KevinBuckley70's Avatar
Oxfordshire, UK
Joined Jul 2001
279 Posts
Bluetooth pairing

I am still having a problem getting anything to pair with the Crius BT module. It doesn't stay in 'pairing mode' long enough (see video):

Crius AIOP/BT module - pairing (0 min 30 sec)

If I am really fast I can get a bluetooth scan to find it &, if I am lucky, request a pairing code. But I can't enter the code fast enough to complete the action before the red LED on the BT module stops flashing which I guess means pairing has timed-out?

Is that what it looks like for other users of this module?

I am running MPNG, latest version. But I think the pairing activity happens without any action from the AIOP. I think the BT module does that on its own. Does anyone know if that is correct? Or why my module is behaving this way?
KevinBuckley70 is offline Find More Posts by KevinBuckley70
Reply With Quote
Old Sep 15, 2012, 12:15 PM
Fly it like you STOL it!
Endlesslag's Avatar
United States, FL, Daytona Beach
Joined Jan 2011
4,063 Posts
Still getting a

GPS:478: error: expected declaration before '}' token
On line 479 in your GPS.ino
Endlesslag is offline Find More Posts by Endlesslag
Reply With Quote
Old Sep 15, 2012, 12:17 PM
Advanced Monkey
nebstress's Avatar
United Kingdom, England
Joined Nov 2011
1,605 Posts
Quote:
Originally Posted by KevinBuckley70 View Post
I am still having a problem getting anything to pair with the Crius BT module. It doesn't stay in 'pairing mode' long enough (see video):

http://www.youtube.com/watch?v=X6MyqYSmNuE
If I am really fast I can get a bluetooth scan to find it &, if I am lucky, request a pairing code. But I can't enter the code fast enough to complete the action before the red LED on the BT module stops flashing which I guess means pairing has timed-out?

Is that what it looks like for other users of this module?

I am running MPNG, latest version. But I think the pairing activity happens without any action from the AIOP. I think the BT module does that on its own. Does anyone know if that is correct? Or why my module is behaving this way?
When the LED stops flashing it means that it is connected.

You should only have to Pair it once with your PC, after that it will connect automatically.
nebstress is offline Find More Posts by nebstress
Reply With Quote
Old Sep 15, 2012, 12:23 PM
Advanced Monkey
nebstress's Avatar
United Kingdom, England
Joined Nov 2011
1,605 Posts
Quote:
Originally Posted by Endlesslag View Post
Still getting a

GPS:478: error: expected declaration before '}' token
On line 479 in your GPS.ino

Again, this is a bit more from mine including the code added in blue:
(you might have to delete a line if it appears twice after adding the code)
Code:
  /************************************/
   
#if defined(GPS_SERIAL)
 
  #if defined(UBLOX)
   UBLOX_init();
   delay(200);
  #endif

#if defined(MTK)
   MTK_init();
   delay(200);
#endif

    SerialOpen(GPS_SERIAL,GPS_BAUD);  
    delay(400);  
    for(uint8_t i=0;i<=5;i++){
      GPS_NewData(); 
      LEDPIN_ON
      delay(20);
      LEDPIN_OFF
      delay(80);
    }
    if(!GPS_Present){
      SerialEnd(GPS_SERIAL);
      SerialOpen(0,SERIAL_COM_SPEED);
    }      
    #if !defined(GPS_PROMINI)
      GPS_Present = 1;
    #endif
    GPS_Enable = GPS_Present;    
  #endif
  /************************************/
nebstress is offline Find More Posts by nebstress
Reply With Quote
Old Sep 15, 2012, 12:24 PM
Registered User
KevinBuckley70's Avatar
Oxfordshire, UK
Joined Jul 2001
279 Posts
Quote:
Originally Posted by nebstress View Post
When the LED stops flashing it means that it is connected.

You should only have to Pair it once with your PC, after that it will connect automatically.
In that video, it was not connected to anything. There were no other BT enabled devices around.
KevinBuckley70 is offline Find More Posts by KevinBuckley70
Reply With Quote
Old Sep 15, 2012, 12:28 PM
Advanced Monkey
nebstress's Avatar
United Kingdom, England
Joined Nov 2011
1,605 Posts
Quote:
Originally Posted by KevinBuckley70 View Post
In that video, it was not connected to anything. There were no other BT enabled devices around.
What was the point in the video then, after you power the BT on you need to open the Mission Planner & Click Connect.
nebstress is offline Find More Posts by nebstress
Reply With Quote
Old Sep 15, 2012, 12:32 PM
Fly it like you STOL it!
Endlesslag's Avatar
United States, FL, Daytona Beach
Joined Jan 2011
4,063 Posts
Quote:
Originally Posted by nebstress View Post
Again, this is a bit more from mine including the code added in blue:
(you might have to delete a line if it appears twice after adding the code)



nope, didn't make a difference, even copying and pasting the whole section.
For now I might just go without the GPS...everything else seems to work fine.
Endlesslag is offline Find More Posts by Endlesslag
Reply With Quote
Old Sep 15, 2012, 12:34 PM
Advanced Monkey
nebstress's Avatar
United Kingdom, England
Joined Nov 2011
1,605 Posts
Quote:
Originally Posted by Endlesslag View Post
nope, didn't make a difference, even copying and pasting the whole section.
For now I might just go without the GPS...everything else seems to work fine.
Have you changed the GPS Baud to 57600 in Config.h?


Code:
#define GPS_SERIAL 2 // should be 2 for flyduino v2. It's the serial port number on arduino MEGA
    #define GPS_BAUD   57600
[EDIT]

What GPS Module are you using?
nebstress is offline Find More Posts by nebstress
Last edited by nebstress; Sep 15, 2012 at 12:42 PM.
Reply With Quote
Old Sep 15, 2012, 01:15 PM
Registered User
KevinBuckley70's Avatar
Oxfordshire, UK
Joined Jul 2001
279 Posts
Quote:
Originally Posted by nebstress View Post
What was the point in the video then, after you power the BT on you need to open the Mission Planner & Click Connect.
The point of the video was that it is easier to show what the module is doing rather than trying to explain it in words.

It doesn't stay in pairing mode long enough for me to pair it with anything - assuming that red LED flashing means it IS in pairing mode (& that when it stops flashing it is NOT in pairing mode anymore). If I have my BT device already scanning when I apply power to the module, it IS recognised. But then it drops out of pairing before I can get to the point of clicking 'pair with this device'. This is not the usual behaviour of a BT peripheral.

I believe that you can only connect mission planner to a device which has already been paired?
KevinBuckley70 is offline Find More Posts by KevinBuckley70
Reply With Quote
Old Sep 15, 2012, 01:22 PM
Advanced Monkey
nebstress's Avatar
United Kingdom, England
Joined Nov 2011
1,605 Posts
Quote:
Originally Posted by KevinBuckley70 View Post
The point of the video was that it is easier to show what the module is doing rather than trying to explain it in words.

It doesn't stay in pairing mode long enough for me to pair it with anything - assuming that red LED flashing means it IS in pairing mode (& that when it stops flashing it is NOT in pairing mode anymore). If I have my BT device already scanning when I apply power to the module, it IS recognised. But then it drops out of pairing before I can get to the point of clicking 'pair with this device'. This is not the usual behaviour of a BT peripheral.

I believe that you can only connect mission planner to a device which has already been paired?
Yes you are correct "you can only connect mission planner to a device which has already been paired".

Are you sure that it is connected correctly, TX to RX & RX to TX?
nebstress is offline Find More Posts by nebstress
Reply With Quote
Old Sep 15, 2012, 01:48 PM
Registered User
KevinBuckley70's Avatar
Oxfordshire, UK
Joined Jul 2001
279 Posts
Quote:
Originally Posted by nebstress View Post
Yes you are correct "you can only connect mission planner to a device which has already been paired".

Are you sure that it is connected correctly, TX to RX & RX to TX?
Yes. You can see from the colours of the wire (and Black/Brown on the AIOP are connected together to Black on the BT module).

EDIT: Whoops - scratch that. The image doesnt help as the colours are swapped where they join!
KevinBuckley70 is offline Find More Posts by KevinBuckley70
Reply With Quote
Old Sep 15, 2012, 01:58 PM
Advanced Monkey
nebstress's Avatar
United Kingdom, England
Joined Nov 2011
1,605 Posts
Quote:
Originally Posted by KevinBuckley70 View Post
Yes. You can see from the colours of the wire (and Black/Brown on the AIOP are connected together to Black on the BT module).

EDIT: Whoops - scratch that. The image doesnt help as the colours are swapped where they join!
You say "Black/Brown on the AIOP are connected together to Black"

You only need 4 connections to the CRIUS AIOP, TX, RX, VCC & GND, you can remove the other two wires from the '6 way molex' connector.
nebstress is offline Find More Posts by nebstress
Reply With Quote
Old Sep 15, 2012, 02:04 PM
Registered User
KevinBuckley70's Avatar
Oxfordshire, UK
Joined Jul 2001
279 Posts
Quote:
Originally Posted by nebstress View Post
You say "Black/Brown on the AIOP are connected together to Black"

You only need 4 connections to the CRIUS AIOP, TX, RX, VCC & GND, you can remove the other two wires from the '6 way molex' connector.
Yes. I guess there is no harm from doubling-up the two grounds though? I did it that way so that, if I need that connector for something else in the future, it still has also it's wires!

Better image attached.
KevinBuckley70 is offline Find More Posts by KevinBuckley70
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Mini-HowTo Arduino and HobbyKing Multi-Rotor Control Board V3.0 or KKmulticontroller v5.5 pprioverde Multirotor Talk 30 May 14, 2014 10:52 AM
Discussion New updated Crius Multiwii SE flight controller SGsoar Multirotor Electronics 72 May 15, 2013 09:36 PM
Discussion Jim, any plans for more multi rotor flight controller? chris24g Xtreme Power Systems 12 Jun 25, 2012 09:11 PM
Sold One New, one used ArduPilot 2560 APM1.0 Flight Controlls/autopilots wingspinner FPV Equipment (FS/W) 3 May 28, 2012 01:55 AM
Question Quad Build Using HobbyKing Multi-Rotor Control Board V3.0 (Atmega328 PA) SJackson Multirotor Talk 27 Apr 30, 2012 09:51 PM