Hello Everyone ![]()
I would like to ask for your assistance with my project if i may. I am trying to make a talking clock/Thermometer unit using :An Arduino Uno. DS1302 Clock Module. Sparkfun 102 Temperature Module.[/li][/list]
The demo sketches work and mashed together to get a good readout.
My problem is that I am not able to get the sketch to recognize the numbers. I am missing the piece that makes it work . Thank you ahead of time, for helping me complete this task.
char ssr[500]="Good Morning , ";
void loop(){
ds1302_struct rtc;
char buffer[80]; // the code uses 70 characters.
// Read all clock data at once (burst mode).
DS1302_clock_burst_read( (uint8_t *) &rtc);
sprintf( buffer, "Time = %02d:%02d:%02d, ",
bcd2bin( rtc.h24.Hour10, rtc.h24.Hour),
bcd2bin( rtc.Minutes10, rtc.Minutes),
bcd2bin( rtc.Seconds10, rtc.Seconds));
Serial.print("Time,dec:");
SpeechSynthesis.mvm(ssr,6,buffer);
sprintf(buffer, "Date(day of month) = %d, Month = %d, "
"Day(day of week) = %d, Year = %d",
bcd2bin( rtc.Date10, rtc.Date),
bcd2bin( rtc.Month10, rtc.Month),
rtc.Day,
2000 + bcd2bin( rtc.Year10, rtc.Year));
Serial.print( buffer);
SpeechSynthesis.mvm(ssr,2,buffer);
SpeechSynthesis.mvm(ssr,4,buffer);
SpeechSynthesis.Ecommand(0,16,7,ssr);
delay(200);
float celsius = getTemperature();
Serial.print("Celsius: ");
SpeechSynthesis.mvm(ssr,6,"Celsius");
Serial.println(celsius);
delay(300);
float fahrenheit = (1.8 * celsius) + 32;
Serial.print("Fahrenheit: ");
SpeechSynthesis.mvm(ssr,4,"Fahrenheit");
Serial.println(fahrenheit);