EasyVR speech recognition

Arrrggghhh!!! I just had the same issue, edited the #include line causing the problems. I tried different versions of the #include and ended back to the original syntax. And then it worked!!! WTF!!!

I would say, remove line 15 of EasyVR.cpp, save, then put it back again, save and compile. See if that works.

The point is that old CLI flattens the directory on upload, so you need to write #include "protocol.h"

Paul, are you using 1.18.0-libraries.16?

@ScruffR, tried that and it thows an error! I wonder if the pre-processor is playing havoc. And yes, I am using 1.18.0-libraries.16. Is this why it works on mine and not others?

Yup!
I also have lost track of what’s in the official CLI, since testing Libs 2.0, but my last info was that files in subdirectories got uploaded, but into a flat target directory on the build server and hence the includes have to be flattened.

Tried removing line 15 of EasyVR.cpp as you suggested and ran it both from desktop and downloads with same results as before.

@jackpot, make line 15:

#include "protocol.h"

and try again.

@peekay123 same results, ran it from both desktop and downloads location

@peekay123 @jackpot

That Worked!

Changing line 15 in the .cpp to #include “protocol.h”

1 Like

@jackpot, apply my latest fix and it should work like @RWB found.

@peekay123. No clue what I am doing wrong but I still get the same error

That #include "internal/protocol.h" needs to be changed to #include "protocol.h" !

@jackpot, you modified the wrong line. You need to change the one in the section above!

1 Like

@scruff THANK YOU. I just noticed there are 2 instances of the #include. OMG

@peekay123 JACKPOT!

Wow

THANK YOU @peekay123, @RWB and @ScruffR

@jackpot Let us know how the Voice Recognition board works with the Electron.

I’m on the fence about buying one because it will distract me from other projects, but it does look very cool.

Here is a good link with tip on getting the board up and running:

1 Like

I will for sure keep you all posted. I have been playing with it using the shield on the arduino and so far so good. Thanks for the link. I will check it out

1 Like

@RWB, you rock!

1 Like

Well I have a couple of questions now related to this. I have been able to get my original Arduino code (works fine on mega 2560 with the EasyVR shield) to compile on both the Arduino IDE and Particle CLI by making a couple of small additions to the code. The weird thing is that if I change my pin assignments to Electron pins, I cannot get it to compile in either. I have tried #define archPin = D1 and int arch D1; In the sketch for the arduino I had used pins 23-29. I have no clue what I am missing here?

Also, when I do compile it in the Particle CLI I get a rather lengthy filename.bin. Can I rename this? I seem to remember reading something on that but I cant for the life of me, find it now!

Thanks

The CLI has several switches to influence the output.
If you show your command we might spot an issue, but for now you could try this

particle compile electron <yourProjectDirectory> --saveTo firmware.bin

You might have read that here
https://docs.particle.io/reference/cli/#compiling-remotely-and-flashing-locally

and you either do

#define archPin D1  // without the equal sign and semicolon

or

const int archPin = D1; // with both of those
1 Like

@ScruffR Thank you very much. I will give it a try

1 Like