Serial Programming for Robertsonics WAV Trigger

Hello, everyone. I am struggling getting the WAV trigger to work with my Arduino, and I just need a little direction to get started. It seems there should be two ways to talk to it.

  1. Through his WavTrigger library or
  2. Send serial commands through SoftwareSerial et al.

If I do what looks like the simple way, using the library, i get all kinds of compile errors relating to the AltSoftwareSerial library. Most importantly there seems to be no reference to WHERE the WAV trigger is actually plugged into the Arduino, which makes no sense. GitHub - robertsonics/WAV-Trigger-Arduino-Serial-Library: WAV Trigger Serial Control Arduino Library. I didn't do any real code here, except the simplest of example: include the library, declare the variable, and send the play track command. With that I get tons of compile errors dealing with AltSoftwareSerial. I apologize that the little code I did is on my Windows PC, and it doesn't seem to like the forums page here. You can see that AltSoftwareSerial is included in the .h file. Just to make sure I downloaded it to my library as well. Inside the .h file it references the AltSoftwareSerial as follows:

#include "../AltSoftSerial/AltSoftSerial.h"

I think this is saying that the location of this .h file should be one folder up from the location of the sketch?? I didn't save the example first, but that would be the correct location. The folder for this library is saved. It is recognized, and the path would also be accurate if my logic is correct. Most importantly, I see nothing in the library reference or the .h file to tell the arduino where the WAV trigger is connected, which seems like I have to be missing something very simple.

If I do serial commands, it wants a series of bytes, mentioned here: http://robertsonics.com/wav-trigger-online-user-guide/#chapter5.

For example, to send a command to play a track, send the following information, "Comments: Sends a Track Control Code to a specific track number - Example: 0xf0, 0xaa, 0×08, 0×03, 0×01, 0x0a, 0×00, 0×55.

What format would you write the SoftwareSerial command to send this? This gives a compile error saying that write(int) is ambiguous for the write(0x00) line, which tells me it is sending these as integers instead of hex, and it seems like this should be able to be sent properly using one line.

Thank you!

VARIABLE.write(0xf0)
VARIABLE.write(0xaa)
VARIABLE.write(0x08)
VARIABLE.write(0x03)
VARIABLE.write(0x01)
VARIABLE.write(0x0a)
VARIABLE.write(0x00)
VARIABLE.write(0x55)

Hello, everyone. I am struggling getting the WAV trigger to work with my Arduino

What kind of Arduino?

If I do what looks like the simple way, using the library, i get all kinds of compile errors relating to the AltSoftwareSerial library.

No code + no error messages == no help.

Did you download and install the AltSoftSerial library?

Just to make sure I downloaded it to my library as well.

Let's try that one again, without the handwaving this time. You downloaded what, and put it where? Exact names and paths, please.

This gives a compile error saying that write(int) is ambiguous for the write(0x00) line, which tells me it is sending these as integers instead of hex

"integers instead of hex" makes no sense. All data is sent as binary. The value may be of type int or byte or float. What type are your constants? Are they int or are they byte? The write() function expects bytes. The compiler thinks constants are ints. You need to tell the compiler to treat the value 0x00 as a byte:

VARIABLE.write((byte)0x00);

The reason that the others work, and 0 doesn't, is because 0 has a special meaning, as a NULL terminator.

I too am having issues getting this to work. Does anyone know if this was resolved??

Does anyone know if this was resolved??

Did you read the thread? Did you see any answers to the questions?

Hope this isn't too little, too late, but I just did an extensive update of the WAV Trigger Arduino serial control library. There's now an example sketch included with the library, and directions on how to use the library with hardware serial ports instead of AltSoftSerial. I also wrote up a basic tutorial with example tracks. Found here. Includes a link to the library on GitHub.

this product is a piece of shit. i have been fooling with it for 9 hours. if i hit the button on it it plays one of the wav files, but no way is the arduino talking to it. beats me. I've tried everything.

ok, here is what will work. the product is NOT a a piece of shit, but the documentation SURE IS.

they must assume we have extensive background in IDE AND C.

this is what will work for you I promise. Make a second tab for wav trigger.h and wav trigger.cpp include them with " and not> VERY important.

change wav trigger to comment out everything except serial1. use pin 18 of your mega arduino.

now you can play with it to your hearts content.

for the owners of robersonics:
i used the basic sample program with is is anything but. what they really need if a basic program that will make it work without either soft serial or metro. one .h is enough thank you especially when you cannot edit it with ide an we don't know about creating tabs and using "instead of > wow right there. hours lost. put that other shit in the advanced if you want, but not in the basic. and make more advanced, covering one functionality at a time, not all in one using switch case to go thru them. ugh. that sucked. i don't really know what feature is coming out of which case.

once i got it to work, it really is a neat product. congrats!! but you need to add documentation, a simple explanation of all the calls to wavtrigger.h would be nice for starters.