I've managed to set the volume manually for this VMUSIC module:
But now I want to use a POT to control it. But I've got stuck because I'm not sure how to convert the POT reading from a INT into a BYTE. Does anyone have any ideas? Do I have to create an array with all the possible BYTEs or is there an easier way to convert between INTs and BYTES?
Here's my code:
Serial1.print("VSV "); Serial1.print(0x0A,BYTE); // set the voloume. Needs to be a value between 0x00 and 0xFE (0x00 being high) Serial1.print(0x0D,BYTE);
Any help much appreciated