hey billpealer, do you have the completed code that you can share with us? I've been working hard on mine and it works but could always use tweaking. I have a suggestion for the changing of the swing and clash sounds, use the CASE SELECT option in Arduino. Here's the working part of my code that does this. Note, i'm still using 3-line serial mode and am hoping to look at your completed code to modify mine for 1-line.
i am not using a accelerometer so i can't say what will work for your set up. can you tell me what ISNT working, and maybe we can sort it out.
this is the working code for 1 line serial. i think others have said they have reduced the below delay times.
void WT588D_Send_Command(byte addr) {
digitalWrite(WT588D_SDA, LOW);
delay(5);
for(int i = 0; i < 8; i++) {
digitalWrite(WT588D_SDA, HIGH);
if(bitRead(addr, i)) {
delayMicroseconds(600);
digitalWrite(WT588D_SDA, LOW);
delayMicroseconds(200);
} else {
delayMicroseconds(200);
digitalWrite(WT588D_SDA, LOW);
delayMicroseconds(600);
}
}
digitalWrite(WT588D_SDA, HIGH);
delay(100);
} //end WT588D_Send_Command