|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--cork.device.control.MillisecondPWM
PWM generator in teh millisecond range. This class is most useful for DC motors and H-Bridges where the longer pulse length is all that is needed.
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
MillisecondPWM(com.ajile.drivers.gpio.GpioPin pin)
Constructor for the MillisecondPWM object. |
|
MillisecondPWM(com.ajile.drivers.gpio.GpioPin pin,
int high,
int low)
Constructor for the PWM object taht alows pre-setting of the pulse width. |
Method Summary | |
void |
destroy()
called to destroy the object and release it's pin. |
java.lang.String |
getDeviceDestription()
Gets the destription attribute of the Device object |
java.lang.String |
getDeviceName()
Gets the title attribute of the Device object |
int |
getHighPulseWidth()
Gets the high pulse width attribute in milliseconds. |
int |
getLowPulseWidth()
Gets the low pulse width attribute in milliseconds. |
com.ajile.drivers.gpio.GpioPin |
getPin()
Gets the pin attribute of the PWM object |
void |
run()
Main processing method for the PWM object |
void |
setHighPulseWidth(int width)
Sets the high pulse width attribute in milliseconds. |
void |
setLowPulseWidth(int width)
Sets the low pulse width attribute in milliseconds. |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public MillisecondPWM(com.ajile.drivers.gpio.GpioPin pin, int high, int low)
pin
- com.ajile.drivers.gpio.GpioPin the pin to send the pulse on.high
- int the amount of time in milliseconds that the pin will be
high.low
- int the amount of time in milliseconds that the pin will be
low.public MillisecondPWM(com.ajile.drivers.gpio.GpioPin pin)
pin
- com.ajile.drivers.gpio.GpioPin the pin to send the pulse on.Method Detail |
public void run()
run
in class java.lang.Thread
public void destroy()
destroy
in class java.lang.Thread
public java.lang.String getDeviceName()
getDeviceName
in interface Device
public java.lang.String getDeviceDestription()
getDeviceDestription
in interface Device
public int getHighPulseWidth()
public int getLowPulseWidth()
public com.ajile.drivers.gpio.GpioPin getPin()
public void setHighPulseWidth(int width)
width
- int high pulse width.public void setLowPulseWidth(int width)
width
- int low pulse width.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |