Go Down

Topic: (ERRORE) EasyVr_AccessControlDemo (Read 1 time) previous topic - next topic

cgs64


Salve

PREMETTO CHE la scheda EasyVR in questione  si collega regolarmente, ci posso inserire nuovi comandi e riconoscimento vocale, salvando, etc etc, e tutto funziona.

Purtroppo ricevo un errore quando carico un prg Demo fornito (EasyVr_AccessControlDemo) per la scheda EasyVR (riconoscimento vocale), sia con la Ver. 0023 che con la Ver. 1.0 di ARDUINO.
(Nel CODICE ho evidenziato in GRASSETTO BLU la riga dove trova l'errore)

Gli errori sono rispettivamente:

VERSIONE 0023

EasyVR_AccessControlDemo:57: error: no matching function for call to 'EasyVR::EasyVR(NewSoftSerial&)'
F:\- ARDUINO\arduino-0023\libraries\EasyVR/EasyVR.h:185: note: candidates are: EasyVR::EasyVR(Stream&)
F:\- ARDUINO\arduino-0023\libraries\EasyVR/EasyVR.h:33: note:                 EasyVR::EasyVR(const EasyVR&)


VERSIONE 1.0
F:\- ARDUINO\arduino-1.0\libraries\NewSoftSerial\NewSoftSerial.cpp:39:24: error: WConstants.h: No such file or directory
In file included from F:\- ARDUINO\arduino-1.0\libraries\NewSoftSerial\NewSoftSerial.cpp:41:
F:\- ARDUINO\arduino-1.0\libraries\NewSoftSerial\/NewSoftSerial.h:71: error: conflicting return type specified for 'virtual void NewSoftSerial::write(uint8_t)'
F:\- ARDUINO\arduino-1.0\hardware\arduino\cores\arduino/Print.h:48: error:   overriding 'virtual size_t Print::write(uint8_t)'
F:\- ARDUINO\arduino-1.0\libraries\NewSoftSerial\NewSoftSerial.cpp: In member function 'void NewSoftSerial::tx_pin_write(uint8_t)':
F:\- ARDUINO\arduino-1.0\libraries\NewSoftSerial\NewSoftSerial.cpp:291: error: 'LOW' was not declared in this scope
F:\- ARDUINO\arduino-1.0\libraries\NewSoftSerial\NewSoftSerial.cpp: In member function 'void NewSoftSerial::setTX(uint8_t)':
F:\- ARDUINO\arduino-1.0\libraries\NewSoftSerial\NewSoftSerial.cpp:368: error: 'OUTPUT' was not declared in this scope
F:\- ARDUINO\arduino-1.0\libraries\NewSoftSerial\NewSoftSerial.cpp:368: error: 'pinMode' was not declared in this scope
F:\- ARDUINO\arduino-1.0\libraries\NewSoftSerial\NewSoftSerial.cpp:369: error: 'HIGH' was not declared in this scope
F:\- ARDUINO\arduino-1.0\libraries\NewSoftSerial\NewSoftSerial.cpp:369: error: 'digitalWrite' was not declared in this scope
F:\- ARDUINO\arduino-1.0\libraries\NewSoftSerial\NewSoftSerial.cpp:370: error: 'digitalPinToBitMask' was not declared in this scope
F:\- ARDUINO\arduino-1.0\libraries\NewSoftSerial\NewSoftSerial.cpp:371: error: 'digitalPinToPort' was not declared in this scope
F:\- ARDUINO\arduino-1.0\libraries\NewSoftSerial\NewSoftSerial.cpp:372: error: 'portOutputRegister' was not declared in this scope
F:\- ARDUINO\arduino-1.0\libraries\NewSoftSerial\NewSoftSerial.cpp: In member function 'void NewSoftSerial::setRX(uint8_t)':
F:\- ARDUINO\arduino-1.0\libraries\NewSoftSerial\NewSoftSerial.cpp:377: error: 'INPUT' was not declared in this scope
F:\- ARDUINO\arduino-1.0\libraries\NewSoftSerial\NewSoftSerial.cpp:377: error: 'pinMode' was not declared in this scope
F:\- ARDUINO\arduino-1.0\libraries\NewSoftSerial\NewSoftSerial.cpp:379: error: 'HIGH' was not declared in this scope
F:\- ARDUINO\arduino-1.0\libraries\NewSoftSerial\NewSoftSerial.cpp:379: error: 'digitalWrite' was not declared in this scope
F:\- ARDUINO\arduino-1.0\libraries\NewSoftSerial\NewSoftSerial.cpp:381: error: 'digitalPinToBitMask' was not declared in this scope
F:\- ARDUINO\arduino-1.0\libraries\NewSoftSerial\NewSoftSerial.cpp:382: error: 'digitalPinToPort' was not declared in this scope
F:\- ARDUINO\arduino-1.0\libraries\NewSoftSerial\NewSoftSerial.cpp:383: error: 'portInputRegister' was not declared in this scope
F:\- ARDUINO\arduino-1.0\libraries\NewSoftSerial\NewSoftSerial.cpp: In member function 'virtual void NewSoftSerial::write(uint8_t)':
F:\- ARDUINO\arduino-1.0\libraries\NewSoftSerial\NewSoftSerial.cpp:472: error: 'HIGH' was not declared in this scope
F:\- ARDUINO\arduino-1.0\libraries\NewSoftSerial\NewSoftSerial.cpp:472: error: 'LOW' was not declared in this scope
F:\- ARDUINO\arduino-1.0\libraries\NewSoftSerial\NewSoftSerial.cpp:478: error: 'byte' was not declared in this scope
F:\- ARDUINO\arduino-1.0\libraries\NewSoftSerial\NewSoftSerial.cpp:478: error: expected `;' before 'mask'
F:\- ARDUINO\arduino-1.0\libraries\NewSoftSerial\NewSoftSerial.cpp:478: error: 'mask' was not declared in this scope
F:\- ARDUINO\arduino-1.0\libraries\NewSoftSerial\NewSoftSerial.cpp:492: error: 'byte' was not declared in this scope
F:\- ARDUINO\arduino-1.0\libraries\NewSoftSerial\NewSoftSerial.cpp:492: error: expected `;' before 'mask'
F:\- ARDUINO\arduino-1.0\libraries\NewSoftSerial\NewSoftSerial.cpp:492: error: 'mask' was not declared in this scope



CODICE

.... omissis ....

#if defined(ARDUINO) && ARDUINO >= 100
 #include "Arduino.h"
 #include "SoftwareSerial.h"
 SoftwareSerial port(12,13);
#else // Arduino 0022 - use modified NewSoftSerial
 #include "WProgram.h"
 #include "NewSoftSerial.h"
 NewSoftSerial port(12,13);
#endif

#include "EasyVR.h"
#include <Servo.h>

#define SND_Access_denied            1
#define SND_Access_granted           2
#define SND_Hello                    3
#define SND_Please_repeat            4
#define SND_Please_say_your_password 5
#define SND_Please_talk_louder       6


Servo myservo;
EasyVR easyvr(port);
EasyVRBridge bridge;

uint32_t mask = 0;
int8_t group = 0;
uint8_t train = 0;
char name[32];

.... omissis ....

pelletta

Io l'ho usato con l'ide 0022 e ha funzionato a dovere.

cgs64

Provo a riscaricare l'IDE 0022 e vediamo

cgs64

Anche con la 0022 ricevo:

EasyVR_AccessControlCGS64.cpp:1:27: error: NewSoftSerial.h: No such file or directory
EasyVR_AccessControlCGS64:1: error: 'NewSoftSerial' does not name a type
EasyVR_AccessControlCGS64:4: error: 'port' was not declared in this scope
EasyVR_AccessControlCGS64.cpp: In function 'void setup()':
EasyVR_AccessControlCGS64:53: error: 'port' was not declared in this scope


Non capisco !

pelletta

Scusa la domanda, ma hai messo le librerie nell'IDE?

Go Up