|
jAER project on SourceForge | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectch.unizh.ini.jaer.projects.tobi.zipzaps.ZipZapControl
public class ZipZapControl
Controls the Radio Shack ZipZaps micro RC Transformers car via the ServoController port 2, which pulls down on appropriate port 2 bits to activate either steering or acceleration. Control is bang bang.
If steering and speed are independent. Setting speed (fwd or back) does not affect steering, and same for steering.
Constructor Summary | |
---|---|
ZipZapControl()
|
Method Summary | |
---|---|
void |
back()
put on gas reverse |
void |
close()
Closes the device and frees the internal device handle. |
void |
coast()
take off the gas |
void |
fwd()
put on the gas |
java.lang.String |
getTypeName()
get text name of interface, e.g. |
boolean |
isOpen()
|
void |
left()
|
static void |
main(java.lang.String[] args)
|
void |
open()
Opens the device driver and gets a handle to the device which is internally maintained. |
void |
right()
steer right |
void |
stop()
stop steering (go straight) and take off gas |
void |
straight()
stop steering (go straight) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ZipZapControl()
Method Detail |
---|
public java.lang.String getTypeName()
HardwareInterface
getTypeName
in interface HardwareInterface
public void close()
HardwareInterface
close
in interface HardwareInterface
public void open() throws HardwareInterfaceException
HardwareInterface
open
in interface HardwareInterface
HardwareInterfaceException
- if there is a problem. Diagnostics are printeds.public boolean isOpen()
isOpen
in interface HardwareInterface
public void right()
public void left()
public void straight()
public void fwd()
public void back()
public void coast()
public void stop()
public static void main(java.lang.String[] args)
|
jAER project on SourceForge | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |