New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BlynkTimer does not name a type #49

Closed
lorenzoromagnoli opened this Issue Nov 28, 2017 · 2 comments

Comments

Projects
None yet
3 participants
@lorenzoromagnoli

lorenzoromagnoli commented Nov 28, 2017

I'm trying the simple example to send data to the server.
But the example code won't compile.
it seems that it cannot find BlynkTimer inside the library anymore.

here is my code:

/*
  This example shows how value can be pushed from Arduino to
  the Blynk App.

  NOTE:
  BlynkTimer provides SimpleTimer functionality:
    http://playground.arduino.cc/Code/SimpleTimer

  App project setup:
    Value Display widget attached to Virtual Pin V5
 *************************************************************/

/* Comment this out to disable prints and save space */

#define BLYNK_PRINT SerialUSB


#include <SPI.h>
#include <WiFi101.h>
#include <BlynkSimpleWiFiShield101.h>

char ssid[] = SECRET_SSID; //  your network SSID (name)
char pass[] = SECRET_PSW;//  your network PASSWORD ()

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = SECRET_AUTH;

BlynkTimer timer;

// This function sends Arduino's up time every second to Virtual Pin (5).
// In the app, Widget's reading frequency should be set to PUSH. This means
// that you define how often to send data to Blynk App.
void myTimerEvent(){
  // You can send any value at any time.
  // Please don't send more that 10 values per second.
  Blynk.virtualWrite(V5, millis() / 1000);
}

void setup(){
  // Debug console
  SerialUSB.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);

  // Setup a function to be called every second
  timer.setInterval(1000L, myTimerEvent);
}

void loop(){
  Blynk.run();
  timer.run(); // Initiates BlynkTimer
}
@doom369

This comment has been minimized.

Show comment
Hide comment
@doom369

doom369 Nov 28, 2017

Collaborator

@lorenzoromagnoli what library version do you have?

Collaborator

doom369 commented Nov 28, 2017

@lorenzoromagnoli what library version do you have?

@lorenzoromagnoli

This comment has been minimized.

Show comment
Hide comment
@lorenzoromagnoli

lorenzoromagnoli Nov 28, 2017

Ok, I figure out that the problem seems related to the Arduino web editor.
on the Java IDE it compiles with no problem.

Here is the full error log.

screen shot 2017-11-28 at 18 36 39

lorenzoromagnoli commented Nov 28, 2017

Ok, I figure out that the problem seems related to the Arduino web editor.
on the Java IDE it compiles with no problem.

Here is the full error log.

screen shot 2017-11-28 at 18 36 39

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment