I tried double , no effect.
Also i tried just send data to virtyal pin, using double , also no use.
I have some ideas where could problems be.
First
Blynk library for Map Widget
template<typename T1, typename T2, typename T3, typename T4>
void location(const T1& index, const T2& lat, const T3& lon, const T4& value) {
Blynk.virtualWrite(mPin, index, lat, lon, value);
}
May be some conflicts appear between format from library and scetch? (i am not sure , just as variant)
Second
Tiny GPS ++ library
void loop()
{
// This sketch displays information every time a new sentence is correctly encoded.
while (ss.available() > 0)
if (gps.encode(ss.read()))
displayInfo();
if (millis() > 5000 && gps.charsProcessed() < 10)
{
Serial.println(F("No GPS detected: check wiring."));
while(true);
}
}
In these example , which works well with my NEO 6M , is a part of code
while (ss.available() > 0)
if (gps.encode(ss.read()))
It is used to avoid data sending conflicts as i understand.
Where can i put in my code for Map Widget?
Is it necessary?
As i see code
/* Comment this out to disable prints and save space */
#define BLYNK_PRINT Serial
#define TINY_GSM_MODEM_SIM900
// Default heartbeat interval for GSM is 60
// If you want override this value, uncomment and set this option:
//#define BLYNK_HEARTBEAT 30
//is that needed?
#include <TinyGsmClient.h>
#include <BlynkSimpleSIM800.h>
#include <TinyGPS++.h>
static const int RXPin = 5, TXPin = 4;
static const uint32_t GPSBaud = 9600;(for NEO 6M)
char auth[] = "YourAuthToken";
char apn[] = "YourAPN";
char user[] = "";
char pass[] = "";
// The TinyGPS++ object
TinyGPSPlus gps;
// The serial connection to the GPS device
SoftwareSerial ss(RXPin, TXPin);
#include <SoftwareSerial.h>
SoftwareSerial SerialAT(7, 8); // RX, TX
TinyGsm modem(SerialAT);
WidgetMap myMap(V1);
void setup()
{
// Debug console
Serial.begin(9600);
// Set GSM module baud rate
SerialAT.begin(19200);
delay(3000);
ss.begin(GPSBaud);
//does delay needed//
// Restart takes quite some time
// To skip it, call init() instead of restart()
modem.restart();
// Unlock your SIM card with a PIN
//modem.simUnlock("1234");
Blynk.begin(auth, modem, apn, user, pass);
// If you want to remove all points:
//myMap.clear();
int index = 1;
double lat = gps.location.lat();
double lon = gps.location.lon();
myMap.location(index, lat, lon, "value");
I think here may be needed these check code from library
while (ss.available() > 0)
if (gps.encode(ss.read()))
}
void loop()
{
Blynk.run();
}
Main questions:
- Braud rates of SIM900 and GPS NEO 6M have to be different as i made (NEO 9600 and Sim 19200) or not?
- Does it matters in what order and whith what delay begin serials for GSM and GPS?
- How to associate code from Tiny gps++ for waiting data and blynk timers for delay and etc.?
- Library for Map Widget maybe needs any modifications?
@vshymanskyy I will be really greathful to see your thoughts!)
Also any other opinion will be useful!