Cubecell Software Serial

Hi WASN,bwooce and Arron

Just to Say thanks for your advice. I now have several example sketches working using the softSerial function at 9600 baud with my GPS (Quectel L70, L96) chips. Will now combine with LoRaWAN sketches to act as a High Altitude tracker with Cubecell Board or Module.

The Key for me was the missing Math functions in the .cpp either TinyGPS or TinyGPS++. We really need a CubeCell Maths.h library. I did not go down the vscode route, I assume that must add in maths function at some point. Thought I do use vscode for other projects like the FOSSASAT Groundstation.

Still looking forward to the ASR6502 due to the increase in serial ports but mainly the added Analogue inputs, As in my current project I need to monitor both battery and solar input levels V and A, to allow power optimising and spare energy used to warm units, as they may go to -40C.

Simon

just uploaded an example for using a GPS with the softSerial and LoRaWAN inlcuding TTN Decoder:

This needs the changes from @bwooce mentioned above (adding defines in TinyGPS++.cpp)

I am using this GPS module:

https://de.aliexpress.com/item/32978843367.html?spm=a2g0s.8937460.0.0.78d82e0exdY2Ho

it fits in the sensor side of the CubeCell Capsule

Hi,

Thanks for all the info and the hard work. I am trying to add my GPS neo 6m with the code you provided. but I keep getting this error when compiling :
softSerial.h: No such file or directory…

Sorry I am new at this

J

have you installed the extension for the cubecell with the boardmanager?
if yes please use the github repository.

Yes, all the examples are working except the GPS one because of the softSerial.h:

Ok I manage to resolve the problem by copy paste the mising softserial.

But now when compiling I have the following error. I did make the changes from @bwooce
…Documents\Arduino\libraries\TinysGPSPLus/TinyGPS++.h:27:25: fatal error: application.h: No such file or directory …

just edit the file TinyGPS++.h
and delete the referenced line

I followed all the good advise in this thread, but got stuck very close to success:
Using the “LoRaWan_GPS” example gets me a successful fix of the position at the first run, but for all subsequent loops I’m only seeing the old data again: E.g. latitude and longitude have for all measures that exact same number till 7th or 8th digit. It seems the position is not updated at all. What can I try to fix this?

FYI: If I try “TinyGPS” from the examples library, I can see each second alternating positions and measures on the console. I conclude from this, that my Neo M8N is basically working on the CubeCell.

Maybe it is of interest that the TinyGPS example can be even more simplified by making some changes. The ‘smartDelay(0)’ function call spread into a lot of time consuming functions can then be avoided.

I made the following changes:

char buff[2000];
int buffIndex;

char getch()
{
long startTime;

startTime = millis();
while (true)
{
if (millis() - startTime > 50)
return(’?’); // timeout, char invalid
if (ss.available())
return (ss.read());
}
}

void loop()
{
char c;
buffIndex = 0;

while (true)
{
c = getch();
//Serial.print©;
if (c == ‘?’ && buffIndex > 0) // fix complete?
break; // no more chars for this fix
if (c != ‘?’)
buff[buffIndex++] = c;
delay(0);
}
buff[buffIndex] = ‘\0’; // put an end char
for (int i=0; i < buffIndex; i++)
{
gps.encode(buff[i]);
}
//Serial.print(buff);
delay(0);

It relies on the observation that a GPS module sends a bunch of data when it has got a fix, then is waiting for the next fix. So this time can nicely be used in the program by putting the incoming data into a buffer, calling the tinyGPS++ library and after that doing all the processing or display of the data.
I tested that with a Ublox GPS M6 module.

Nobody interested in this? Could be useful for @wasn in his example.

Achim