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.
- Through his WavTrigger library or
- 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)