I am using the new blynk app 2.0. Do they still hand out 32 character token authorization keys?
I did not get an email for my project. Here is my code.
//Viral Science www.viralsciencecreativity.com www.youtube.com/c/viralscience
//Realtime GPS Tracker with Nodemcu ESP8266
#include <TinyGPS++.h>
#include <SoftwareSerial.h>
#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
//#include <BlynkSimpleEsp8266_SSL.h>
#define BLYNK_TEMPLATE_ID "TMPLI51PydZt"
#define BLYNK_DEVICE_NAME "GPS Tracker"
static const int RXPin = 4, TXPin = 5; // GPIO 4=D2(conneect Tx of GPS) and GPIO 5=D1(Connect Rx of GPS
static const uint32_t GPSBaud = 9600; //if Baud rate 9600 didn't work in your case then use 4800
TinyGPSPlus gps; // The TinyGPS++ object
WidgetMap myMap(V0); // V0 for virtual pin of Map Widget
SoftwareSerial ss(RXPin, TXPin); // The serial connection to the GPS device
BlynkTimer timer;
float spd; //Variable to store the speed
float sats; //Variable to store no. of satellites response
String bearing; //Variable to store orientation or direction of GPS
char auth[] = "--------------------"; //Your Project authentication key
char ssid[] = "ORBI88"; // Name of your network (HotSpot or Router name)
char pass[] = "rapidearth125"; // Corresponding Password
//unsigned int move_index; // moving index, to be used later
unsigned int move_index = 1; // fixed location for now
void setup()
{
Serial.begin(115200);
Serial.println();
ss.begin(GPSBaud);
//Blynk.begin(auth, ssid, pass);
Blynk.begin(auth, ssid, pass, "blynk.cloud.com", 80);
//Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8080);
timer.setInterval(5000L, checkGPS); // every 5s check if GPS is connected, only really needs to be done once
}
void checkGPS(){
if (gps.charsProcessed() < 10)
{
Serial.println(F("No GPS detected: check wiring."));
Blynk.virtualWrite(V4, "GPS ERROR"); // Value Display widget on V4 if GPS not detected
}
}
void loop()
{
while (ss.available() > 0)
{
// sketch displays information every time a new sentence is correctly encoded.
if (gps.encode(ss.read()))
displayInfo();
}
Blynk.run();
timer.run();
}
void displayInfo()
{
if (gps.location.isValid() )
{
float latitude = (gps.location.lat()); //Storing the Lat. and Lon.
float longitude = (gps.location.lng());
Serial.print("LAT: ");
Serial.println(latitude, 6); // float to x decimal places
Serial.print("LONG: ");
Serial.println(longitude, 6);
Blynk.virtualWrite(V1, String(latitude, 6));
Blynk.virtualWrite(V2, String(longitude, 6));
myMap.location(move_index, latitude, longitude, "GPS_Location");
spd = gps.speed.kmph(); //get speed
Blynk.virtualWrite(V3, spd);
sats = gps.satellites.value(); //get number of satellites
Blynk.virtualWrite(V4, sats);
bearing = TinyGPSPlus::cardinal(gps.course.value()); // get the direction
Blynk.virtualWrite(V5, bearing);
}
Serial.println();
}
Thanks for the reply. My project does not appear on the search because it is still in developer mode. I have the NodeMCU and GPS connected. I have the code written and ive uploaded the code but I cant connect to the NodeMCU with my blynk app. I did the Blink tutorial and got that working but now im doing this project where im trying to get lat and long coordinates but it doesnt seem to be connecting. Screenshot below. Also, I changed the code to blink.cloud.com.
Since I cant get my project to connect to the blynk app, is there something wrong with the internet code? After i upload code, I go to blynk and add new device but it wont connect or it cant be found…
I think you’re failing to understand the process.
With the connection method you are using, after you have created the Template, you need to create the Device from that template.
Once you’ve done this, you will get the BLYNK_TEMPLATE_ID, BLYNK_DEVICE_NAME and BLYNK_AUTH_TOKEN.
These need to be the FIRST LINES of your sketch.
Also, when yo are posting code to the forum, please DO NOT POST SCREENSHOTS.
Copy and paste the code and put triple backticks on a blank line at the beginning and end of the code.
Triple backticks look like this:
I have the and i made the change to blynk.cloud. I upload my sketch (code). I go to blynk app to add new device but I’m not getting the esp8266 wifi to appear on my phone. What else could be wrong?
If I don’t get it to connect I cant get get authorization token it is asking for.
//Realtime GPS Tracker with Nodemcu ESP8266
#include <TinyGPS++.h>
#include <SoftwareSerial.h>
#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
//#include <BlynkSimpleEsp8266_SSL.h>
#define BLYNK_TEMPLATE_ID "TMPLSDoisDr9"
#define BLYNK_DEVICE_NAME "LED Blink"
static const int RXPin = 4, TXPin = 5; // GPIO 4=D2(conneect Tx of GPS) and GPIO 5=D1(Connect Rx of GPS
static const uint32_t GPSBaud = 9600; //if Baud rate 9600 didn't work in your case then use 4800
TinyGPSPlus gps; // The TinyGPS++ object
WidgetMap myMap(V0); // V0 for virtual pin of Map Widget
SoftwareSerial ss(RXPin, TXPin); // The serial connection to the GPS device
BlynkTimer timer;
float spd; //Variable to store the speed
float sats; //Variable to store no. of satellites response
String bearing; //Variable to store orientation or direction of GPS
char auth[] = ""; //Your Project authentication key
char ssid[] = "ORBI88"; // Name of your network (HotSpot or Router name)
char pass[] = "rapidearth125"; // Corresponding Password
//unsigned int move_index; // moving index, to be used later
unsigned int move_index = 1; // fixed location for now
void setup()
{
Serial.begin(115200);
Serial.println();
ss.begin(GPSBaud);
//Blynk.begin(auth, ssid, pass);
Blynk.begin(auth, ssid, pass, "blynk.cloud", 80);
//Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8080);
timer.setInterval(5000L, checkGPS); // every 5s check if GPS is connected, only really needs to be done once
}
void checkGPS(){
if (gps.charsProcessed() < 10)
{
Serial.println(F("No GPS detected: check wiring."));
Blynk.virtualWrite(V4, "GPS ERROR"); // Value Display widget on V4 if GPS not detected
}
}
void loop()
{
while (ss.available() > 0)
{
// sketch displays information every time a new sentence is correctly encoded.
if (gps.encode(ss.read()))
displayInfo();
}
Blynk.run();
timer.run();
}
void displayInfo()
{
if (gps.location.isValid() )
{
float latitude = (gps.location.lat()); //Storing the Lat. and Lon.
float longitude = (gps.location.lng());
Serial.print("LAT: ");
Serial.println(latitude, 6); // float to x decimal places
Serial.print("LONG: ");
Serial.println(longitude, 6);
Blynk.virtualWrite(V1, String(latitude, 6));
Blynk.virtualWrite(V2, String(longitude, 6));
myMap.location(move_index, latitude, longitude, "GPS_Location");
spd = gps.speed.kmph(); //get speed
Blynk.virtualWrite(V3, spd);
sats = gps.satellites.value(); //get number of satellites
Blynk.virtualWrite(V4, sats);
bearing = TinyGPSPlus::cardinal(gps.course.value()); // get the direction
Blynk.virtualWrite(V5, bearing);
}
Serial.println();
}```
I dont think i understood what you meant. I have no knowledge in this sorta stuff. I am trying to go by a youtube video but the individual who did this did it in the old blynk app and this code is no longer working I guess. I was hoping it would be as easy as copy and paste but it is not.
I am trying to simply get coordinates for a project I am doing that would track my dog in the back yard.
I am using a nodeMCU esp8266 and a ublox neo 6m.
If you would like to take the time and walk me through what you mean I would greatly appreciate it.
Here is what I have done so far:
I created the template, added the data streams and saved.
I have added the code you see above in arduino 1.8.19 and uploaded it.
I have gone to the blynk app and added the widgets I need.
Now I’m trying to add new device but it is not picking up the nodeMCU wifi.