I have managed to get my wemos d1 r2 online I have uploaded the email sketch however I am getting no email I have subsituted pin 2 which is on the email sketch for the Arduino to D4 on the Wemos d1 r2 and altered the sketch to suit the new pin number as usual any advice would be appreciated Thanks oldvolt
Does the serial monitor show the “Button is pressed” statement?
And did you remember to setup the email widget on the app?
Hi I did setup the email widget on the app the serial monitor does not show the button being pressed I tried another sketch outwith Blynk to make sure the Wemos D1 R2 board could connect to the internet and it did work I was able to blink a led over the net I also tried another sketch led blink it worked fine as an arduino uno usb serial but when I tried to change the sketch to a wemos d1 r2 and upload the sketch via arduino ide I got an error message " Blynk Timer "does not name type
Thanks oldvolt
Might as well show us the sketch. Also, are you using Cloud or Local server?
Hi Costas
I have the latest library installed 0.4.8
I have attached a screenshot of the sketch, on the attachment there are no details of ssid or password but I did fill in the details before I uploaded the sketch with the same result as the attachment
thanks oldvolt
my thanks also go to Gunner
Cut and paste your sketch as we can’t see / read it all in the image.
Hi All
Its the Led Blink sketch that I am having problems with ,I have cut and pasted the sketch without any information of ssid & password for the Wemos D1 R2
/*************************************************************
Download latest Blynk library here:
https://github.com/blynkkk/blynk-library/releases/latest
Blynk is a platform with iOS and Android apps to control
Arduino, Raspberry Pi and the likes over the Internet.
You can easily build graphic interfaces for all your
projects by simply dragging and dropping widgets.
Downloads, docs, tutorials: http://www.blynk.cc
Sketch generator: http://examples.blynk.cc
Blynk community: http://community.blynk.cc
Follow us: http://www.fb.com/blynkapp
http://twitter.com/blynk_app
Blynk library is licensed under MIT license
This example code is in public domain.
*************************************************************
Blynk using a LED widget on your phone!
App project setup:
LED widget on V1
*************************************************************/
/* Comment this out to disable prints and save space */
#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "YourAuthToken";
// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "YourNetworkName";
char pass[] = "YourPassword";
WidgetLED led1(V1);
BlynkTimer timer;
// V1 LED Widget is blinking
void blinkLedWidget()
{
if (led1.getValue()) {
led1.off();
Serial.println("LED on V1: off");
} else {
led1.on();
Serial.println("LED on V1: on");
}
}
void setup()
{
// Debug console
Serial.begin(9600);
Blynk.begin(auth, ssid, pass);
// You can also specify server:
//Blynk.begin(auth, ssid, pass, "blynk-cloud.com", 8442);
//Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8442);
timer.setInterval(1000L, blinkLedWidget);
}
void loop()
{
Blynk.run();
timer.run();
}
This is the error message that appears
C:\Users\John\Documents\Arduino\sketch_jul11a\sketch_jul11a.ino: In function ‘void setup()’:
sketch_jul11a:69: error: ‘timer’ was not declared in this scope
timer.setInterval(1000L, blinkLedWidget);
‘BlynkTimer’ does not name a type
Thanks oldvolt
Which library version are you using? You need at least 0.4.7 for Blynk Timer but best to use 0.4.8.
Costas
I have 0.4.8 installed
I have also tried it with a nodemcu 12E as well with the same result
thanks oldvolt
Just compiled your sketch here for a WeMos and it’s fine. That suggests you might not actually have 0.4.8 installed and if you do, not correctly. Comment out the timer related lines and see if it compiles then work out what has happened to your libraries.