Hello!
I am trying to make a tracker using Map Widget.
Code is
#define BLYNK_DEBUG // Optional, this enables lots of prints
#define BLYNK_PRINT Serial
#define TINY_GSM_MODEM_SIM900
#include <TinyGsmClient.h>
#include <BlynkSimpleSIM800.h>
#include <TinyGPS++.h>
#include <SoftwareSerial.h>
static const int RXPin = 5, TXPin = 4;
static const uint32_t GPSBaud = 9600;
TinyGPSPlus gps;
SoftwareSerial ss(RXPin, TXPin);
const char auth[] =
const char apn[] =
const char user[] =
const char pass[] =
SoftwareSerial SerialAT(7, 8); // RX, TX
TinyGsm modem(SerialAT);
WidgetMap myMap(V1);
void setup()
{
// Set console baud rate
Serial.begin(115200);
delay(10);
ss.begin(GPSBaud);
delay(10);
// Set GSM module baud rate
SerialAT.begin(9600);
delay(3000);
// Restart takes quite some time
// To skip it, call init() instead of restart()
Serial.println("Initializing modem...");
modem.restart();
Blynk.begin(auth, modem, apn, user, pass);
int index = 1;
long lat = (gps.location.lat(), 7);
long lon = (gps.location.lng(), 7);
myMap.location(index, lat, lon, "value");
}
void loop()
{
Blynk.run();
}
Ihave problem with gps data format.
Using gps part only i get in serial normal format, but in blynk debug it is wrong
Initializing modem…
[12608]
___ __ __
/ _ )/ /_ _____ / /__
/ _ / / // / _ / '/
///_, /////_
/__/ v0.4.4 on Arduino Uno
[12615] Free RAM: 1013
[12617] Modem init…
[13377] Connecting to network…
[17120] Network: MTS-RUS
[17121] Connecting to ****************…
[29296] Connected to GPRS
[29565] Connecting to blynk-cloud.com:8442
[31388] <[02|00|01|00] *********************
[32681] >[00|00|01|00|C8]
[32683] Ready (ping: 992ms).
[32684] <[11|00|01|00]ever[00]0.4.4[00]h-beat[00]60[00]buff-in[00]256[00]dev[00]Arduino Uno[00]cpu[00]ATmega328P[00]con[00]SIM800[00]build[00]Mar 12 2017 21:18:05[00]
[33073] <[14|00|02|00|10]vw[00]1[00] 1[00]0[00]0[00] value (in these line should be lat and long data)
[34641] >[00|00|01|00|C8]
Can someone help, plz?