jAER project on SourceForge

ch.unizh.ini.jaer.projects.tobi.zipzaps
Class ZipZapControl

java.lang.Object
  extended by ch.unizh.ini.jaer.projects.tobi.zipzaps.ZipZapControl
All Implemented Interfaces:
HardwareInterface

public class ZipZapControl
extends java.lang.Object
implements HardwareInterface

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.

Author:
tobi

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

ZipZapControl

public ZipZapControl()
Method Detail

getTypeName

public java.lang.String getTypeName()
Description copied from interface: HardwareInterface
get text name of interface, e.g. "CypressFX2" or "SiLabsC8051F320"

Specified by:
getTypeName in interface HardwareInterface

close

public void close()
Description copied from interface: HardwareInterface
Closes the device and frees the internal device handle. Never throws an exception.

Specified by:
close in interface HardwareInterface

open

public void open()
          throws HardwareInterfaceException
Description copied from interface: HardwareInterface
Opens the device driver and gets a handle to the device which is internally maintained.

Specified by:
open in interface HardwareInterface
Throws:
HardwareInterfaceException - if there is a problem. Diagnostics are printeds.

isOpen

public boolean isOpen()
Specified by:
isOpen in interface HardwareInterface
Returns:
true if interface is open, false otherwise

right

public void right()
steer right


left

public void left()

straight

public void straight()
stop steering (go straight)


fwd

public void fwd()
put on the gas


back

public void back()
put on gas reverse


coast

public void coast()
take off the gas


stop

public void stop()
stop steering (go straight) and take off gas


main

public static void main(java.lang.String[] args)

jAER project on SourceForge