Navspark mini Arduino samples

NavSpark, NavSpark-GL, NavSpark-BD, & NavSpark-mini

Moderator: Alex Lin

cnxsoft
Posts: 1
Joined: Wed Jan 20, 2016 9:00 pm
Contact:

Navspark mini Arduino samples

Postby cnxsoft » Wed Jan 20, 2016 9:03 pm

Based Navspark user's guide, most Arduino samples are not compatible with NavSpark mini, except demo_hello_world_nmea, which I cannot find in http://navspark.mybigcommerce.com/conte ... xample.zip.

Many of these samples are said to be "partially compatible", as they should work but require modifications. May I know which modifications would be required? Are working Navspark mini samples available for download somewhere? Thanks.

Alex Lin
Posts: 448
Joined: Fri Sep 25, 2015 11:12 am
Contact:

Re: Navspark mini Arduino samples

Postby Alex Lin » Thu Jan 21, 2016 10:39 am

cnxsoft wrote:Based Navspark user's guide, most Arduino samples are not compatible with NavSpark mini, except demo_hello_world_nmea, which I cannot find in http://navspark.mybigcommerce.com/conte ... xample.zip.

Many of these samples are said to be "partially compatible", as they should work but require modifications. May I know which modifications would be required? Are working Navspark mini samples available for download somewhere? Thanks.


NavSpark-mini is no default console with GNSS Library, see "17. UART 1, UART 2 vs NavSpark Boards" in NavSpark-User-Guide. If you program NavSpark mini without GNSS feature, you only need to modify "Serial" to "Serial1".

ersatz
Posts: 5
Joined: Tue Feb 16, 2016 10:41 am
Contact:

Re: Navspark mini Arduino samples

Postby ersatz » Tue Feb 16, 2016 11:05 am

Does anyone have a known working minimal code snippet for the NavSpark Mini. To my surprise, I cannot find any simple code that is known to run without modification. I have tried the code below ("demo_hello_world"), but it doesn't seem to work -- when i look at the serial monitor, I only see "Error3" over and over.

Thanks in advance for your help!


Code: Select all

uint8_t led = 13;

void setup() {
GnssConf.init();
// put your setup code here, to run once:
pinMode(led, OUTPUT);
Serial.config(STGNSS_UART_8BITS_WORD_LENGTH, STGNSS_UART_1STOP_BITS, STGNSS_UART_NOPARITY);
Serial.begin(9600);
}

void loop()
{
// put your main code here, to run repeatedly:
}

void task_called_after_GNSS_update(void)
{
static uint8_t val = HIGH;
char buf[32];
if (val == HIGH) {
digitalWrite(led, HIGH);
sprintf(buf, "Hello world (GPIO%02d high)\r\n", led);
Serial.print(buf);
val = LOW;
}
else if (val == LOW) {
digitalWrite(led, LOW);
sprintf(buf, "Hello world (GPIO%02d low)\r\n", led);
//Serial.print(buf);
val = HIGH;
}
}

Kuo Hsu
Posts: 45
Joined: Fri Feb 13, 2015 5:07 pm
Contact:

Re: Navspark mini Arduino samples

Postby Kuo Hsu » Tue Feb 16, 2016 1:34 pm

Try Tutorial 2 from our website: http://www.navspark.com.tw/tutorial-2

It should work for NavSpark-mini.

Alex Lin
Posts: 448
Joined: Fri Sep 25, 2015 11:12 am
Contact:

Re: Navspark mini Arduino samples

Postby Alex Lin » Tue Feb 16, 2016 1:52 pm

Please update to navspark-1.0.3 via Boards manager :

Code: Select all

http://navspark.mybigcommerce.com/content/package_navspark_index.json


And you can reference the 3rd post in here :
http://www.navsparkforum.com.tw/viewtopic.php?f=23&t=272&p=1107&hilit=9600#p1107

ersatz
Posts: 5
Joined: Tue Feb 16, 2016 10:41 am
Contact:

Re: Navspark mini Arduino samples

Postby ersatz » Tue Feb 16, 2016 2:27 pm

Kuo, thank you, I will try that tutorial next.

Alex, thank you as well, that thread is interesting. Fwiw, I am already using 1.0.3, so I do not believe I am encountering any problems from using an old version.

The help is most appreciated. I will report back when I have had time to attempt this.


Return to “NavSpark Modules”

Who is online

Users browsing this forum: No registered users and 1 guest