lishere / i2c-gps-nav

Automatically exported from code.google.com/p/i2c-gps-nav
0 stars 0 forks source link

CN-06 RCTimer receiver defaulting to 9600baud 1Hz #4

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
This will make the arduino set the GPS receiver to 57600baud 10Hz every time 
the arduino starts:

////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////
// Setup
//
void setup() {

  uint8_t i;

  //rctimer CN-06 gps receiver
  delay(1000); //give the GPS receiver time to boot
  Serial.begin(9600);
  byte gps10hz[] = {0xB5,0x62,0x06,0x08,0x06,0x00,0x64,0x00,0x01,0x00,0x01,0x00,0x7A,0x12,0xB5,0x62,0x06,0x08,0x00,0x00,0x0E,0x30};
  Serial.write(gps10hz,22);
  delay(500); //give the GPS receiver time to process
  byte baudrate57600[] = {0xB5,0x62,0x06,0x00,0x14,0x00,0x01,0x00,0x00,0x00,0xD0,0x08,0x00,0x00,0x00,0xE1,0x00,0x00,0x07,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0xE2,0xE1,0xB5,0x62,0x06,0x00,0x01,0x00,0x01,0x08,0x22};
  Serial.write(baudrate57600,37);
  Serial.end();

NOTE: 
1. may also work for other u-blox based GPS receivers
2. works by sending UBX config messages that would otherwise be sent by an 
application like u-center

Original issue reported on code.google.com by tjerksla...@gmail.com on 29 Jul 2012 at 3:16

GoogleCodeExporter commented 8 years ago
And what would this code help if the system is restarted. GPS would have 
57600boud because of the battery that keeps this information for a limited 
time. You try to connect to it with 9600 so that you can reinitialize it will 
not accept any commands because it is already setup with 57600. Will the code 
be passed over in that case or it will wait an answer from the GPS which will 
never come...?

Original comment by mircea.c...@gmail.com on 16 Sep 2012 at 8:43

GoogleCodeExporter commented 8 years ago
It doesn't wait for the GPS to reply. If the GPS is already running at 57600 
then it will ignore the 9600 commands.

Original comment by tjerksla...@gmail.com on 16 Sep 2012 at 10:02

GoogleCodeExporter commented 8 years ago
Good to know, anyhow, I have used the additional EEPROM and it works perfect 
with 115200bps. I guess your code is the best for people not having soldering 
skills.

Original comment by mircea.c...@gmail.com on 20 Sep 2012 at 5:47

GoogleCodeExporter commented 8 years ago
Why use 115k if 57k is more than fast enough for 10hz? Higher baud rate is more 
chance of error.

Original comment by tjerksla...@gmail.com on 20 Sep 2012 at 5:53

GoogleCodeExporter commented 8 years ago
Will someone, ANYONE, please respond to this comment?  I have all the boards 
(MultiWii v1.0, CN-06, I2C-GPS, and FTDI) and software.  I have downloaded the 
I2C-GPS-NAV sketch and opened it in Arduino 1.0.1.  Here is where I hit the 
wall.  Arduino wants to "verify" (compile?) code before writing to my I2C-GPS 
board and this .INO file DOES NOT verify!  I get a dozen orange errors at the 
bottom of the sketch whenever I try to upload or verify.  Is this file to be 
"cut and pasted" elsewhere?  I tried adding it to the MultiWii_2_0 sketch and 
it still would not upload.  How do I "flash" the I2C-GPS?

Thank You - Baran

Original comment by redding...@gmail.com on 26 Sep 2012 at 6:20

Attachments:

GoogleCodeExporter commented 8 years ago
Thank you Baran for going off-topic...

This is not a forum, and your post has nothing to do with my code suggestion.

The GPS to i2c board software is a separate project and should NOT be opened 
inside the multiwii project. Put all the I2C-GPS-NAV files in a directory named 
after the .ino file and it should compile. Else format your computer.

Original comment by tjerksla...@gmail.com on 27 Sep 2012 at 7:59

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
This looks like the fix I need, but I have no idea where in the sketch to 
insert this code.
a little help?
useing an HK MW-FC SE2.0 with MWC 2.1 
I2c-GPS has latest 2.1RC2 sketch installed, CN-06 has zero battery life. loses 
config faster than I can unplug and plug back in.

Original comment by d...@nanaimocs.com on 13 Oct 2012 at 3:50

GoogleCodeExporter commented 8 years ago
Almost 2 years old but my rctimer GPS  came with a dead battery and I think id 
like to use this work around. 

Original comment by InfoTech...@gmail.com on 6 Apr 2014 at 3:28

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Just wanted to say, Life saver Code snippet, thanks a billion!

This snippet was added to the filename: I2C_GPS_NAV_v2_2.ino around line 1400

-CRIUS I2C-GPS board with NEO-7M UBLOX from GLB
-MINI MWC with DSM2 receiver from HK

Original comment by daichc...@gmail.com on 7 Sep 2014 at 11:04

GoogleCodeExporter commented 8 years ago
Just to be clear, my GPS board is a gy-gps6mv2 with the NEO-7M module on it

Original comment by daichc...@gmail.com on 8 Sep 2014 at 6:53