RoboJDETM v2.0

com.ridgesoft.robotics.effectors
Class DevantechSP03

java.lang.Object
  extended by com.ridgesoft.robotics.effectors.DevantechSP03

public class DevantechSP03
extends Object

Class to interface with the Devantech SP03 speech synthesizer.


Constructor Summary
DevantechSP03(I2CMaster i2cMaster)
          Constructs a DevantechSP03 object.
 
Method Summary
 int getSoftwareRevision()
          Gets the software revsion of the device's software.
 boolean isBusy()
          Returns true if the SP03 is busy with the previous command.
 void speak(int phraseNumber)
          Speaks a predefined phrase.
 void speak(int volume, int speed, int pitch, String text)
          Speaks a text message.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait
 

Constructor Detail

DevantechSP03

public DevantechSP03(I2CMaster i2cMaster)
Constructs a DevantechSP03 object.

Parameters:
i2cMaster - I2C object for the bus the range finder connects to
Method Detail

getSoftwareRevision

public int getSoftwareRevision()
                        throws IOException
Gets the software revsion of the device's software.

Returns:
software revision number
Throws:
IOException

isBusy

public boolean isBusy()
               throws IOException
Returns true if the SP03 is busy with the previous command.

Returns:
true if SP03 is busy, otherwise false
Throws:
IOException

speak

public void speak(int phraseNumber)
           throws IOException
Speaks a predefined phrase.

Parameters:
phraseNumber - number of a phrase previously stored in the SP03 (1 to 30)
Throws:
IOException

speak

public void speak(int volume,
                  int speed,
                  int pitch,
                  String text)
           throws IOException
Speaks a text message.

Parameters:
volume - 0 = loudest, 7 = quietest
speed - see SP03 documentation, 5 is a good starting point
pitch - see SP03 documentation, 3 is a good starting point
text - Message to speak, maximum 81 ASCII characters
Throws:
IOException

RoboJDETM v2.0

Copyright (c) 2003-2009 RidgeSoft, LLC. All rights reserved.
www.ridgesoft.com