[SOLVED] Blynk Example Sketches won't compile

I am using IDE 1.0.6 and opened an example sketch from File/Examples/Blynk_v0.3.1/Blynk/Getting Started/Servo and this sketch doesn’t compile. I tried to upload other examples from the Getting Started folder, but none will compile. Here are the errors I get.

This report would have more information with "Show verbose output during compilation" enabled in File > Preferences. Arduino: 1.0.6 (Windows 7), Board: "Arduino Mega 2560 or Mega ADK" Servo.ino: In function 'void setup()': Servo:38: error: 'Blynk' was not declared in this scope Servo.ino: At global scope: Servo:42: error: expected constructor, destructor, or type conversion before '(' token Servo.ino: In function 'void loop()': Servo:49: error: 'Blynk' was not declared in this scope

  1. You are missing the Blynk libraries.
  2. Suggest you add verbose.
  3. Suggest you use 1.6.X
1 Like

Thank you for the reply. I have since upgraded to IDE 1.6.7, but now I am not even able to install the library. I’ve tried the Sketch/Import Library procedure to no avail, I tried to copy the uncompressed Blynk library from Documents/Arduino into the Library folder in Program Files (x86), but still am not able to get the IDE to “see” anything related to Blynk. I also tried to manually launch a Blynk example sketch from inside the library, but no go there too. I assume everyone else has a functioning Blynk library that was downloaded from codebender which leaves me to scratch my head at this.

also, what do you mean “add verbose”?

Set in the Arduino IDE it sometimes gives you more of an idea why the sketch is not compiling.

@myggle I guess you are quite new to the way Arduino IDE handles libraries etc. When I moved from 1.0.X to 1.6.X I found it a bit of a struggle at first. Good news is the newer IDE’s have more options to install libraries.

One of the best ways is via json but maybe we’ll save that for another day.

I would try the zip install. Download Blynk from Github, then from IDE menu select Sketch, include library, add zip library. I am on 1.6.4 as for some hardware set ups there are problems with the IDE after 1.6.5 but see how you go with 1.6.7.

If you still can’t install the libraries let us know and we will try one of the other ways.

with some help from the arduino forum, I was able to determine that my libraries folder was corrupted when I backed up my data onto an external hard drive. Upon copying my Arduino folder into my pc, some of the files were moved around and just getting them out of the library straightened out some of my problem. Because the Blynk_v0.3.1 library I got from GitHub unzipped to a folder that contains 4 additional folders, there was no .h or .cpp file for the IDE to recognize. Those files are kept in any of the 4 sub folders so just deleting the parent Blynk folder and copying the 4 sub folders right into my libraries folder completely solved my problem. The Blynk Servo sketch compiled and I’m back on track.

1 Like