Go Down

Topic: Error in the library  (Read 2888 times) previous topic - next topic

roccol00

Error in the library <BlynkSimpleShieldEsp8266_SoftSer.h> and in the library <ESP8266_SoftSer.h>

pert

Don't post screenshots of text! That is very unhelpful. When you encounter an error you'll see a button on the right side of the orange bar "Copy error messages". Click that button. Paste the error in a message here USING CODE TAGS (</> button on the toolbar). It is almost never appropriate to post screenshots but in some cases it is helpful to post images. You should attach and embed the image following these instructions:
http://forum.arduino.cc/index.php?topic=364156

The problem is you need to install the Cayenne library. It available in Library Manager so this is very easy. Do this:
  • Sketch > Include library > Manage libraries...
  • Wait for download to finish
  • In the "Filter your search by..." box, type: "cayenne".
  • Click on "Cayenne by myDevices"
  • Click "Install"
  • Wait for installation to complete
  • Click "Close"

roccol00

Code: [Select]
Arduino:1.8.3 (Windows 7), Scheda:"Arduino/Genuino Uno"

In file included from C:\Users\Utente\Desktop\macchina\macchina.ino:2:0:

C:\Users\Utente\Documents\Arduino\libraries\Cayenne/BlynkSimpleShieldEsp8266_SoftSer.h:27:29: fatal error: ESP8266_SoftSer.h: No such file or directory

 #include <ESP8266_SoftSer.h>

                             ^

compilation terminated.

exit status 1
Errore durante la compilazione per la scheda Arduino/Genuino Uno.

Questo report potrebbe essere più ricco di informazioni abilitando l'opzione
"Mostra un output dettagliato durante la compilazione"
in "File -> Impostazioni"





I have inserted the cayenne library but now I am from this error

pert

It turns out this code you found is written for use with an outdated version of the Blynk library. You can make it compile by installing Blynk library version 0.3.4:

There has been a lot of work on the Blynk library in the 1.5 years since v0.3.4 was released so you might want to try to rewrite the code to work with the latest release of that library.

roccol00

Code: [Select]
Arduino:1.8.3 (Windows 7), Scheda:"Arduino/Genuino Uno"

C:\Users\Utente\Desktop\macchina\macchina.ino: In function 'void setup()':

macchina:60: error: 'IPAddress' was not declared in this scope

  Blynk.begin(auth, "ssid", "password", IPAddress(192,168,1,100), 8442);

                                                                                    ^

exit status 1
'IPAddress' was not declared in this scope

Questo report potrebbe essere più ricco di informazioni abilitando l'opzione
"Mostra un output dettagliato durante la compilazione"
in "File -> Impostazioni"





Instead of "ssid" and "password" we have entered the data of our wifi network

pert

Add this include:
Code: [Select]
#include <IPAddress.h>

roccol00

Code: [Select]
Arduino: 1.8.3 (Windows 7), Card: "Arduino / Genuino Uno"

C: \ Users \ User \ AppData \ Local \ Temp \ ccS7J8ZU.ltrans3.ltrans.o: In the `__static_initialization_and_destruction_0 'function:

E: \ machine \ New folder (2) \ machine / machine.in: 7: unspecified reference to `ESP8266 :: ESP8266 (SoftwareSerial &) '

Collect2.exe: Error: ld returned 1 output state

Output Status 1
Error while compiling for Arduino / Genuino Uno board.

This report might be richer in information by enabling the option
"Show detailed details when compiling"
In "File -> Settings"


Now I get this error

pert

Please post your full sketch. If possible you should always post code directly in the forum thread as text using code tags (</> button on the toolbar). This will make it easy for anyone to look at it, which will increase the likelihood of you getting help. If the sketch is longer than the forum will allow then it's ok to add it as an attachment.

Please always do a Tools > Auto Format on your code before posting it. This will make it easier for you to spot bugs and make it easier for us to read. If you're using the Arduino Web Editor then you will not  have access to this useful tool. I recommend using the standard Arduino IDE instead.

When your code requires a library that's not included with the Arduino IDE please always post a link(using the chain link icon on the toolbar to make it clickable) to where you downloaded that library from or if you installed it using Library Manger(Sketch > Include Library > Manage Libraries) then say so and state the full name of the library.

roccol00

Code: [Select]
rduino: 1.8.3 (Windows 7), Card: "Arduino / Genuino Uno"

E: \ machine \ machine.ino: 3: 103: Fatal error: BlynkSimpleShieldEsp8266_SoftSer.h: No file or directory

#include <BlynkSimpleShieldEsp8266_SoftSer.h> // Set ESP8266 Serial Item

^

Completion is complete.

Output Status 1
Error while compiling for Arduino / Genuino Uno board.

This report might be richer in information by enabling the option
"Show detailed details when compiling"
In "File -> Settings"



We are creating a wireless machine that will be controlled by a smartphone.
But in filling out the program, this error comes out

pert

this error comes out
We already fixed that error. Why didn't you post your sketch, as I requested in my last reply?

roccol00

Code: [Select]

#define BLYNK_PRINT Serial   
#include <BlynkSimpleShieldEsp8266_SoftSer.h>                          // Set ESP8266 oggetto di serie
#include <SoftwareSerial.h>
#include <ESP8266_SoftSer.h>
SoftwareSerial EspSerial(2, 3);                                        // RX, TX
ESP8266 wifi(EspSerial);                                               // Si dovrebbe ottenere Auth Token nel Blynk App.
                                                                      // Vai alla impostazioni di progetto (icona dado).
char auth[] = "14dbb0d926e0464280e56443eb7df4ef";
char ssid[] = "YourNetworkName";
char pass[] = "YourPassword";
#define m11 8
#define m12 9
#define m21 10
#define m22 11
void avanti()
{
  digitalWrite(m11, HIGH);
  digitalWrite(m12,LOW);
  digitalWrite(m21,HIGH);
  digitalWrite(m22,LOW);
}
void indietro()
{
  digitalWrite(m11, LOW);
  digitalWrite(m12,HIGH);
  digitalWrite(m21,LOW);
  digitalWrite(m22,HIGH);
}
void destra()
{
  digitalWrite(m11, HIGH);
  digitalWrite(m12,LOW);
  digitalWrite(m21,LOW);
  digitalWrite(m22,LOW);
}
void sinistra()
{
  digitalWrite(m11, LOW);
  digitalWrite(m12,LOW);
  digitalWrite(m21,HIGH);
  digitalWrite(m22,LOW);
}
void Stop()
{
  digitalWrite(m11, LOW);
  digitalWrite(m12,LOW);
  digitalWrite(m21,LOW);
  digitalWrite(m22,LOW);
}
void setup()
{
   // impostare tasso di console baud
  Serial.begin(9600);                                                               // Set ESP8266 velocità di trasmissione
                                                                                    // 9600 è raccomandato per Software Serial
  delay(10);
  EspSerial.begin(9600);
  delay(10);
 // Blynk.begin(auth,, "nome", "password");                                      //nome e password del wifi
  //Blynk.begin(auth, ssid, pass, "blynk-cloud.com", 8442);
  Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8442);
  pinMode(m11, OUTPUT);
  pinMode(m12, OUTPUT);
  pinMode(m21, OUTPUT);
  pinMode(m22, OUTPUT);
}
BLYNK_WRITE(V1)
{
  int x = param[0].asInt();
  int y = param[1].asInt();                                                         //fai qualcosa con x e y
 
  if(y>220)
  avanti();
  else if(y<35)
  indietro();
  else if(x>220)
  destra();
  else if(x<35)
  sinistra();
  else
  Stop();
}
void loop()
{
  Blynk.run();
}


Sorry I was wrong to post!! :( 
now I insert the full sketch

pert

Please do this:
  • File > Preferences > Show verbose output during > compilation (check) > OK
  • Sketch > compile/verify
  • After an error occurs you will see a button on the right side of the orange bar, "Copy error messages". Click that button.
  • Paste the error in a reply here using code tags.

roccol00

in file not exist preferences

pert

That's because your Arduino IDE is in Italian. You just need to translate the word Preferences to Italian, "Impostazioni". Was that so difficult?

roccol00

Code: [Select]
C: \ Users \ User \ Desktop \ machine / machine.in: 7: Unspecified reference to `ESP8266 :: ESP8266 (SoftwareSerial &) '

Collect2.exe: Error: ld returned 1 output state

I use Cayenne Library to version 0.3.4 in the folder: C: \ Users \ User \ Documents \ Arduino \ libraries \ Cayenne
I use the SoftwareSerial library to version 1.0 in the folder: C: \ Program Files (x86) \ Arduino \ hardware \ arduino \ avr \ libraries \ SoftwareSerial
Output Status 1
Error while compiling for Arduino / Genuino Uno board.


This is the error

Go Up