Thank you all for your replies, some with practical suggestions and some more supportive in general.
First let me appolgise and accept the gentle admonishment for my dismissive stance, and title to this thread. It is a bourne from fatigue and frustration. Please forgive me.
Second thank you to BulldogLowell for your offer. I am actually in the UK, and shoe boxing my stock of cores, photons and the odd electron will not be financial burden. If neccessary I am sure I can pass them on to a good home at the London Hackspace. But thank you for the offer, that was kind hearted.
In an attempt to deconstruct the situation I’ll try and be a bit more specific, but be warned I may be meandering.
The project at hand is a reasonalby straight forward GPS tracking project which initially involved an uBlox Neo-6M. This is quite straight forward, didn’t make much difference if it was developed on a core/photon or electron, but clearly was intended to be deployed on an electron. I used the TinyGPS libary. All was pretty much well, the code was designed to createda Particle.variable and by using a raspbery Pi running a simple phyton 3.4 script I could pole the electron to find its position rather than have the electron pump out data on a time interval wasteing bandwidth when nothing interesting was likely to be happening. The Pyton script would then store the data and it could be used to draw a GPS route or specific location on Goggle maps.
The project got put aside for a few months until around christmas I treated my self to a ‘Ublox NEO-M8N GPS & Compass with shell for PIX PX4 Pixhawk Flight Controller’ from ebay hoping it had a genuine Neo-M8N module as the Galileo Sat sytem had recently gone live and I thought that would be fun to play with. Anyway it wasn’t genuine module inside, but hey thats fea-bay for you and no big deal it was still a functioning Sat Nav Module which output a serial signal. Now the phrasing for the Neo-M8N module is slightly different for the phrasing most GPS units so although it should have been fine with the TinyGPS++ libary I discovered it was not. But I also discovered someone who had come accross this before and Modified the TinyGPS++ libary to fix the phrasing
Check out:-
I tested in on an Arduino UNO and it worked nicley with my fake Neo8 and it should be possible to port over to the Particle platform and ultimately the Electron. Although it was not a genuine Neo-8 it was packaged nicely.
So this is were it all started to fall apart. I noticed that the Particle Libarys included the TinyGPS++ libary and started there, on a core to get a working model before moving on the electron. No joy. I’d try flashing the core and sometimes it would flash, and others it would time out. Other times the Web IDE and the console would report it was online but it would be sat next to me quickly flashing green for a while, pausing blue, and then quickly flashing green. The only way I could get over this was to reset all the wifi credentials. Then I noticed that I could only do this using the CLI and Particle Setup over usb. The Spark android app was not working (But I’d had issues with that before). I managed to get the core back online, but I did notice that whilst in the claiming stage of resetting the Wifi credentials it never completed that task. But I have its credentials estabished and it started working again. This I discovered the at time it really would take and age to be able to flash, and some times I was not sure that it was. So I wrote as simple bit of test code:-
int count = 0;
void setup() {
//Particle.variable("Counter", &count, INT);
Particle.variable("Count", count);
Serial.begin(9600);
}
void loop() {
count = count+1;
Particle.publish("Count", String(count));
Serial.println(String(count));
Serial.println("Count test New Firmware ");
delay(6000);
}
Now I could monitor the flash functioning and by chageing the text in the Serial.println, know I was infact recodeing the core. On serveral occasions it did not update the core, although the web IDE reported that it had.
The the core would start forgetting Wifi credentials as I moved between work, the London Hackspace and home.
So having estabished that the core was not performing, the project got put aside again, as it was taking too much time just to get a stable platform before I could try to debug/modify the libary.
Then I returned back to my project, and found to my dismay whenever I flashed one bit of code to the core, I got the fast flashing green light treatment, but I was able to flash the same core with a blink test routine as often as I liked. I eventually figured out that flashing this code:-
#include <TinyGPS++/TinyGPS++.h>
//#include <SoftwareSerial.h>
//#include "application.h"
/*
This sample sketch demonstrates the normal use of a TinyGPS++ (TinyGPSPlus) object.
It requires the use of SoftwareSerial, and assumes that you have a
4800-baud serial GPS device hooked up on pins 4(rx) and 3(tx).
*/
//static const int RXPin = 4, TXPin = 3;
//static const uint32_t GPSBaud = 9600;
// The TinyGPS++ object
TinyGPSPlus gps;
// The serial connection to the GPS device
//SoftwareSerial ss(RXPin, TXPin);
void setup()
{
Serial1.begin(9600);
// delay(2000);
// Serial1.begin(9600);
//ss.begin(GPSBaud);
Serial.println(F("DeviceExample.ino"));
Serial.println(F("A simple demonstration of TinyGPS++ with an attached GPS module"));
Serial.print(F("Testing TinyGPS++ library v. ")); Serial.println(TinyGPSPlus::libraryVersion());
Serial.println(F("by Mikal Hart"));
Serial.println();
}
void loop()
{
// This sketch displays information every time a new sentence is correctly encoded.
while (Serial1.available() > 0)
if (gps.encode(Serial1.read()))
//Serial.println(Serial1.read());
// Serial.println("loop");
displayInfo();
if (millis() > 5000 && gps.charsProcessed() < 10)
{
Serial.println(F("No GPS detected: check wiring."));
while(true);
}
//delay(1000);
}
void displayInfo()
{
delay(1000);
Serial.print(F("Location: "));
if (gps.location.isValid())
{
Serial.print(gps.location.lat(), 6);
Serial.print(F(","));
Serial.print(gps.location.lng(), 6);
}
else
{
Serial.print(F("INVALID"));
}
Serial.print(F(" Date/Time: "));
if (gps.date.isValid())
{
Serial.print(gps.date.month());
Serial.print(F("/"));
Serial.print(gps.date.day());
Serial.print(F("/"));
Serial.print(gps.date.year());
}
else
{
Serial.print(F("INVALID"));
}
Serial.print(F(" "));
if (gps.time.isValid())
{
if (gps.time.hour() < 10) Serial.print(F("0"));
Serial.print(gps.time.hour());
Serial.print(F(":"));
if (gps.time.minute() < 10) Serial.print(F("0"));
Serial.print(gps.time.minute());
Serial.print(F(":"));
if (gps.time.second() < 10) Serial.print(F("0"));
Serial.print(gps.time.second());
Serial.print(F("."));
if (gps.time.centisecond() < 10) Serial.print(F("0"));
Serial.print(gps.time.centisecond());
}
else
{
Serial.print(F("INVALID"));
}
Serial.println();
}
ALWAYS resulted in the green light death if I used firmware 0.6.1 on a core, but 0.3.4 was safe-ish.
Then I discovered that I could no longer edit the libarty in the IDE. In the past I has used libarys, and if I used them the libary code would apear as tabs in my IDE, and I could edit them, but not now… for some reason. And thats when I got to the point I’m giving up…
Ok, If you have kept up this far, this is my conclusions.
I’m a mechanical engineer, so I’m not stupid, I can problem solve, if not spell.
The Partical is a fast evolving platform, so here is a tip to myself. Its a good idea to write which firmwear you initially wrote and tested your code in and on what device. I have discovered code I wrote a while back is broken becasue of firware updates.
Libarys (I know can be useful, and Code junkies are going to hate me for saying this) are unreliable, they often do not follow development as core-code might. As they are written by someone else, the flow can be difficult to follow, when you try to debug or deconstruct it. At least in the days for Fortran we include all our subrouines in the code, so it followed the programe development. I’ve lost count the number of times I’ve watched a Code-expect look thought someone elses libary with disdain, I think they have only been polite when they have looked at my kiddie-code. I’ve never been sure who the real experts have been. Mind you the look on their faces when they discovered that there is an M6 fine and and M6 course thread (for our American readers subsitute UNF and UNC)…
Of particualr point to make the existing TinyGPS++ libary in its examples uses softwear serial, which is not supported on the Partical platform as far as I can tell. So there must be a tonne of people banging their heads on that one. So why is it in the Libary in the first place… It’s been there a while…
Yes abandoning the Core and pulling out a photon would make sence. Even the suggestion of re setting the core as is apparently suffers Old-timers desiese. I take those points on board. But I like the fact the core has TX and RX written on the pins… Yes I can use which ever pins in the photon, but I have to keep looking it up…
Anyway thank you for your attention, your thoughts and letting me throw out my thoughts…
Kind regards
Liam