xaua246
25.12.2008, 19:06
Hallo
Dies ist ein Basic Programm für Sp03 Sprachmodul über I2C an rncontrol.
Kann jemand die Zeilen korrigieren, sodass es bascom compiler versteht.
Gruss xaua246
' ************************************************** *************
' * SP03 Example Software Supplied by Revolution Education Ltd. *
' ************************************************** *************
'*** setup i2c ***
' Define i2c slave address for the SP03 Speech Module
I2cslave $c4 , I2cfast , I2cbyte
' *** firmware ***
' read firmware version into b1 and display on screen
Readi2c 1 ,(b1)
Debug B1
Main:
' *** message playback ***
'first play back a pre-recorded message (msg 1)
'remember to use pause to give message time to play
Writei2c 0 ,(1)
Pause 5000
' *** instant speech ***
' now download text to instantly speak
' first write text to speak to buffer
' nop(0), volume(0), pitch(5), speed(1), "text", null(0)
' note creative spelling makes picaxe sound better!
Writei2c 0 ,(0 , 0 , 5 , 1 , "Hello pickacks user" , 0)
' now actually say it (with time delay to playback)
Writei2c 0 ,(64)
Pause 5000
Goto Main
Dies ist ein Basic Programm für Sp03 Sprachmodul über I2C an rncontrol.
Kann jemand die Zeilen korrigieren, sodass es bascom compiler versteht.
Gruss xaua246
' ************************************************** *************
' * SP03 Example Software Supplied by Revolution Education Ltd. *
' ************************************************** *************
'*** setup i2c ***
' Define i2c slave address for the SP03 Speech Module
I2cslave $c4 , I2cfast , I2cbyte
' *** firmware ***
' read firmware version into b1 and display on screen
Readi2c 1 ,(b1)
Debug B1
Main:
' *** message playback ***
'first play back a pre-recorded message (msg 1)
'remember to use pause to give message time to play
Writei2c 0 ,(1)
Pause 5000
' *** instant speech ***
' now download text to instantly speak
' first write text to speak to buffer
' nop(0), volume(0), pitch(5), speed(1), "text", null(0)
' note creative spelling makes picaxe sound better!
Writei2c 0 ,(0 , 0 , 5 , 1 , "Hello pickacks user" , 0)
' now actually say it (with time delay to playback)
Writei2c 0 ,(64)
Pause 5000
Goto Main