lil help,. and or who wants to make a weekend's worth of drinkin money?
I have combined Sugar's code with Illuis's Code, (and made the naming consistencies jive) and as per Jakes's recommendation : "put this SOMEWHERE in your code... " for the sending the HEX code to the WT5xxx..
Created this below.
#define WT588D_RST 7 //Module pin "REST" or pin # 1
#define WT588D_CS 6 //Module pin "P02" or pin # 11
#define WT588D_SCL 9 //Module pin "P03" or pin # 10
#define WT588D_SDA 8 //Module pin "P01" or pin # 9
#define WT588D_BUSY 10 //Module pin "LED/BUSY" or pin # 15
byte file_count = 1;
void setup() {
pinMode(WT588D_RST, OUTPUT);
pinMode(WT588D_CS, OUTPUT);
pinMode(WT588D_SCL, OUTPUT);
pinMode(WT588D_SDA, OUTPUT);
pinMode(WT588D_BUSY, INPUT);
digitalWrite(WT588D_CS, HIGH);
digitalWrite(WT588D_RST, HIGH);
digitalWrite(WT588D_SCL, HIGH);
}
void loop()
{
//Turn on repeat mode
WT588D_Send_Command(0xF2);
//Begin playlist 0
WT588D_Send_Command(0x00);
WT588D_Send_Command(file_count);
file_count++;
if(file_count == 8) file_count = 0;
delay(50); //give the module time to start playing
while(digitalRead(WT588D_BUSY) == 0) { }
delay(200);
}
void WT588D_Send_Command(byte addr) {
digitalWrite(WT588D_SCL, LOW);
delay(5);
for(int i = 0; i < 8; i++) {
digitalWrite(WT588D_SCL, HIGH);
if(bitRead(addr, i)) {
delayMicroseconds(600);
digitalWrite(WT588D_SCL, LOW);
delayMicroseconds(200);
} else {
delayMicroseconds(200);
digitalWrite(WT588D_SCL, LOW);
delayMicroseconds(600);
}
}
digitalWrite(WT588D_SCL, HIGH);
delay(100);
}
It does,. absolutely nothing. my arduino button press (thanks for the internal resistor code Jake) turns on my LEDS,.. turns them off too.
plays no sound. i still do not know how the one button will trigger DATA to go out the SCL pipe,. nor can i deduce how this code DOES anything. is there a .H library in play that NO ONE is talkin about?
After reading every post 7 times, spent over 25 hours,.. ergo,.. $1000.00 of man hours..
I am going offer a fire sale for anyone who'd like to buy my sound modules, and 3 arduino boards.
I have 25 hours into this project for the coding alone. and that's real money and time for naught.
My wt588D works fine in button (key) mode,. plays all my sounds.. i can not get the arduino to control it.
Who would like to make $100 and send me their working code for 1 line serial mode,.. not the crumbs posted here. real operational code. paypal at the ready.