Thanks for the update
For mapping or range test. I am building Arudino mega + lora shield + adafruit ultimate gps v3 … Please correct me if I am wrong. Many thanks
GPS >> arduino Shield pin mapping…
vin >>vin
Gnd >> gnd
Tx >> rx (0)
Rx >> tx (1)
Config with ABP :
#include <lmic.h>
#include <hal/hal.h>
#include <SPI.h>
#include <TinyGPS.h>
TinyGPS gps;
…
GPS got fixed in 30 second to 1 min… however, only 0000000000 delivered as a payload.
Compiling the code has no error.
isn’t the GPS 3v3 logic level ? ( and the mega uart 5v)
Thanks for prompt reply. I powered mega by USB 5v. and GPS breakout board by mega VIN. Like this UNO examplw wiring @https://learn.adafruit.com/adafruit-ultimate-gps/arduino-wiring. Please tell me how should I wire since mega use hw serial as discussed in previous posts.
I’m doing it with a Seeeduino LoRaWAN w/ GPS
Thanks for sharing. However, I do not have those hw/resource and the frequency is EU.
// what’s the name of the hardware serial port?
#define GPSSerial Serial1
I have added #define GPSSerial Serial1
Serial output : However, not receiving any packet in the console.
Sta69,N,01323.7657,E,0.16,292.15,040118,A6F
$GPVTG,292.15,T,M,0.16,N,0.30,K,A34
Packet queued
$GPRMC,095352.000,A,5232.2469,N,01323.7657,E,0.16,292.15,040118,A6F
$GPVTG,292.15,T,M,0.16,N,0.30,K,A34
Packet queued
Starting
,603
$GPRMC,095356.000,A,5232.2473,N,01323.7654,E,0.25,292.15,040118,A63
$GPVTG,292.15,T,M,0.25,N,0.47,K,A*34
$GPGGA,095357.000,5232.2474,N,01323.7655,E,1,06,0.98,69.3,M,44.7,M,5C
$GPGSA,A,3,09,03,31,17,22,02,1.30,0.98,0.86Packet queued
Code…
hi,
pls read this when you are placing lots of code
did you see the edited picture … youre wiring is wrong for the mega
Thank you. I have changed the Pinout : GPS >> Mega
VIN >> 5V
GND >> GND
Tx >> RX1 (19)
Rx >> TX1 (18)
Is it correct? The GPS got a fix but no data in the console
If I was you I disconnect the lora board from the mega and first try to get communication between the mega and the GPS module.
also I think that the signallevel from the GPS is to low for the mega but I’m not sure @ this moment
I’m trying to get a TTN Mapper node working with Pro Mini, RFM95W, Neo6 GPS, and a small OLED display with the position information. I want it to be able to happily run in the background unless I press a button to turn on the display.
All working fine, except it takes longer than normal to lock, and doesn’t take read all the position data in one go - it will update long, say, then a few iterations later HDOP, Alt etc. All this makes me suspect it’s not reading the serial feed properly.
I clearly don’t understand the scheduling of lmic and/or how to handle the softserial port. I’ve got the GPS feeding into ss(9, 8). I’ve got the serial GPS reading in do_send (see below) which just doesn’t feel like the right place for it. Would it make more sense (and be cleaner) to do the reading and OLED update in an interrupt service routine?
*Forgot to say - I’m using the sample ttn-abp code as a base, and TinyGPS++.
Mark
void do_send(osjob_t* j) {
// Check if there is not a current TX/RX job running
if (LMIC.opmode & OP_TXRXPEND) {
Serial.println(F("OP_TXRXPEND, not sending"));
} else {
while (ss.available())
GPS.encode(ss.read());
oled.clear();
if (GPS.location.lat() == 0.0) {
oled.println("NO FIX :(");
}
else {
oled.println("FIX LOCKED!");
oled.print("Lat: "); oled.println(GPS.location.lat(), 6);
oled.print("Lon: "); oled.println(GPS.location.lng(), 6);
oled.print("Alt: "); oled.print(GPS.altitude.meters(), 1); oled.print(" ");
oled.print("HDOP: "); oled.print(GPS.hdop.hdop(), 1);
}
lpp.reset(); // clear the buffer
lpp.addGPS(1, GPS.location.lat(), GPS.location.lng(), GPS.altitude.meters());
LMIC_setTxData2(1, lpp.getBuffer(), lpp.getSize(), 0);
Serial.println(F("Packet queued"));
}
}
Not exactly the same, but a sort of similar question passed by in another topic. Maybe this example may be useful for you too.
Thank, I’ll have a look tomorrow. Brain fried
Yup, that works just nicely. Thanks for the link!
@ duineuk
You say you use a pro-mini, rfm95, neo6 and a small OLED
I use exact these parts and my GPS-tracker works fine except that I cannot use the 128*64 Oled, I could not find a library small enough to fit in the sketch.
I do not use any sensor and modified the LMIC library a bit so it is 4k smaller (explained in document of ttn_nodeworkshop). There is almost 8kB memory left so maybe a oled can be used.
Which Oled-library are you using with the code on the pro-mini ?
I’m away from home right now so can’t check my source. But it was this or one like it:
Basically you want a text only 1306 driver. It’s the bitmapped screen buffering that takes up the memory - limiting to text drastically reduces the footprint.
Thanks .
I found the library in the library manager of the arduino IDE.
It works cool.
Have you also tried U8x8 (part of U8g2)?
Hello may try this ?