![]() |
|
|
#251 |
|
Administrator
Регистрация: 12.04.2010
Адрес: Москва
Сообщений: 9,618
Вес репутации: 9824 ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Не знаю как EasyVR Shield 3.0, но для EasyVR Shield 2.0
Инструкция по озвучке есть в шапке темы |
|
|
|
|
|
#252 |
|
Junior Member
Регистрация: 03.02.2017
Сообщений: 7
Вес репутации: 0 ![]() |
Спасибо, я читал. Вы мне подскажите, правильно я думаю что звук не скидывается.
|
|
|
|
|
|
#253 |
|
Junior Member
Регистрация: 03.02.2017
Сообщений: 7
Вес репутации: 0 ![]() |
Admin, будь добр, подскажи. На скетче должно быть видно что звуки закинулись на EasyVR Shield 3 ? В командере они работают. Я имею в виду голос Алёны.
|
|
|
|
|
|
#254 |
|
Junior Member
Регистрация: 03.02.2017
Сообщений: 7
Вес репутации: 0 ![]() |
Огромное всем Спасибо !!! Разобрался))) УРА!!!
|
|
|
|
|
|
#255 |
|
Junior Member
Регистрация: 03.02.2017
Сообщений: 7
Вес репутации: 0 ![]() |
Код HTML:
#include "Arduino.h"
#if !defined(SERIAL_PORT_MONITOR)
#error "Arduino version not supported. Please update your IDE to the latest version."
#endif
#if defined(SERIAL_PORT_USBVIRTUAL)
// Shield Jumper on HW (for Leonardo and Due)
#define port SERIAL_PORT_HARDWARE
#define pcSerial SERIAL_PORT_USBVIRTUAL
#else
// Shield Jumper on SW (using pins 12/13 or 8/9 as RX/TX)
#include "SoftwareSerial.h"
SoftwareSerial port(12, 13);
#define pcSerial SERIAL_PORT_MONITOR
#endif
#include "EasyVR.h"
#define SND_AUDIO_1 1
#define SND_AUDIO_2 2
EasyVR easyvr(port);
//Groups and Commands
enum Groups
{
GROUP_0 = 0,
GROUP_1 = 1,
};
enum Group0
{
G0_EVA = 0,
};
enum Group1
{
G1_BAR = 0,
G1_SVET = 1,
G1_STOL = 2,
};
int8_t group, idx;
void setup()
{
// setup PC serial port
pcSerial.begin(9600);
pinMode(7, OUTPUT);
pinMode(10, OUTPUT);
pinMode(11, OUTPUT);
// bridge mode?
int mode = easyvr.bridgeRequested(pcSerial);
switch (mode)
{
case EasyVR::BRIDGE_NONE:
// setup EasyVR serial port
port.begin(9600);
// run normally
pcSerial.println(F("---"));
pcSerial.println(F("Bridge not started!"));
break;
case EasyVR::BRIDGE_NORMAL:
// setup EasyVR serial port (low speed)
port.begin(9600);
// soft-connect the two serial ports (PC and EasyVR)
easyvr.bridgeLoop(pcSerial);
// resume normally if aborted
pcSerial.println(F("---"));
pcSerial.println(F("Bridge connection aborted!"));
break;
case EasyVR::BRIDGE_BOOT:
// setup EasyVR serial port (high speed)
port.begin(115200);
// soft-connect the two serial ports (PC and EasyVR)
easyvr.bridgeLoop(pcSerial);
// resume normally if aborted
pcSerial.println(F("---"));
pcSerial.println(F("Bridge connection aborted!"));
break;
}
while (!easyvr.detect())
{
Serial.println("EasyVR not detected!");
delay(1000);
}
easyvr.setPinOutput(EasyVR::IO1, LOW);
Serial.println("EasyVR detected!");
easyvr.setTimeout(5);
easyvr.setLanguage(0);
group = EasyVR::TRIGGER; //<-- start group (customize)
}
void action();
void loop()
{
if (easyvr.getID() < EasyVR::EASYVR3)
easyvr.setPinOutput(EasyVR::IO1, HIGH); // LED on (listening)
Serial.print("Say a command in Group ");
Serial.println(group);
easyvr.recognizeCommand(group);
do
{
// can do some processing while waiting for a spoken command
}
while (!easyvr.hasFinished());
if (easyvr.getID() < EasyVR::EASYVR3)
easyvr.setPinOutput(EasyVR::IO1, LOW); // LED off
idx = easyvr.getWord();
if (idx >= 0)
{
// built-in trigger (ROBOT)
GROUP_0;
// group = GROUP_X; <-- jump to another group X
return;
}
idx = easyvr.getCommand();
if (idx >= 0)
{
// print debug message
uint8_t train = 0;
char name[32];
Serial.print("Command: ");
Serial.print(idx);
if (easyvr.dumpCommand(group, idx, name, train))
{
Serial.print(" = ");
Serial.println(name);
}
else
Serial.println();
// beep
easyvr.playSound(0, EasyVR::VOL_FULL);
// perform some action
action();
}
else // errors or timeout
{
if (easyvr.isTimeout())
Serial.println("Timed out, try again...");
int16_t err = easyvr.getError();
if (err >= 0)
{
Serial.print("Error ");
Serial.println(err, HEX);
}
}
}
void action()
{
switch (group)
{
case GROUP_0:
switch (idx)
{
case G0_EVA:
// write your action code here
// group = GROUP_X; <-- or jump to another group X for composite commands
break;
}
break;
case GROUP_1:
switch (idx)
{
case G1_BAR:
if (digitalRead(7) == LOW)
{
digitalWrite(7, HIGH);
}
else
{
digitalWrite(7, LOW);
}
// write your action code here
// group = GROUP_X; <-- or jump to another group X for composite commands
break;
case G1_SVET:
if (digitalRead(10) == LOW)
{
digitalWrite(10, HIGH);
}
else
{
digitalWrite(10, LOW);
}
// write your action code here
// group = GROUP_X; <-- or jump to another group X for composite commands
break;
case G1_STOL:
if (digitalRead(11) == LOW)
{
digitalWrite(11, HIGH);
}
else
{
digitalWrite(11, LOW);
}
// write your action code here
// group = GROUP_X; <-- or jump to another group X for composite commands
break;
}
break;
}
}
|
|
|
|
|
|
#256 |
|
Junior Member
Регистрация: 03.02.2017
Сообщений: 7
Вес репутации: 0 ![]() |
Уважаемый, Admin, помогите разобраться со скетчем. Куда и что прописать что бы активировалось после команды EVA, а потом уже команды на выполнение.
|
|
|
|
|
|
#257 |
|
Junior Member
Регистрация: 21.11.2017
Сообщений: 6
Вес репутации: 0 ![]() |
Привет из Болгарии, мне нужна помощь, чтобы сделать это http://radioshem.net/index.php?newsid=131 файл, который для arduino для модуля v2, и у меня есть модуль v3 http://www.elechouse.com/elechouse/i...VR3_manual.pdf и там коды отличаются от кода модуля V2, и я хочу спросить, должен ли я что-нибудь изменить в файле arduino?
|
|
|
|
|
|
#258 |
|
Administrator
Регистрация: 12.04.2010
Адрес: Москва
Сообщений: 9,618
Вес репутации: 9824 ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Здесь обсуждаются модули EasyVR
По Вашему модулю к сожалению я ничем не смогу помочь, не имел возможности его протестировать |
|
|
|
|
|
#259 |
|
Junior Member
Регистрация: 04.03.2014
Сообщений: 23
Вес репутации: 0 ![]() |
Привет всем!
Есть давно приобретений EasyVR Читал что можно увеличить память, тоисть поставить флеш по больше, есть у меня 24LC512, есть желание перепаять ее вместо 24C64 но где взять прошивку. Возможен ли вариант: Слить епром с 24C64 и залить в 24LC512 ??? И что с того вийдет! Очень надо... Спасибо всем.! Кто что то знает откликнетесь..... . .. . . Последний раз редактировалось palagnyukvovan; 20.03.2018 в 16:22. |
|
|
|
|
|
#260 |
|
Administrator
Регистрация: 12.04.2010
Адрес: Москва
Сообщений: 9,618
Вес репутации: 9824 ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Я думаю, что без замены прошивки толку не будет. Так как за адресацию отвечает программный код
|
|
|
|
![]() |
| Здесь присутствуют: 15 (пользователей: 0 , гостей: 15) | |
|
|