Public Member Functions | Public Attributes | Static Public Attributes
src.arduino_driver.Arduino Class Reference

List of all members.

Public Member Functions

def __init__
def analog_read
def analog_write
def close
def connect
def digital_read
def digital_write
def drive
def drive_m_per_s
def execute
def execute_ack
def execute_array
def get_baud
def get_encoder_counts
def open
def pin_mode
def ping
def recv
def recv_ack
def recv_array
def recv_int
def reset_encoders
def send
def servo_read
def servo_write
def stop
def update_pid

Public Attributes

 analog_sensor_cache
 baudrate
 digital_sensor_cache
 encoder_count
 interCharTimeout
 mutex
 PID_INTERVAL
 PID_RATE
 port
 timeout
 writeTimeout

Static Public Attributes

int N_ANALOG_PORTS = 6
int N_DIGITAL_PORTS = 12

Detailed Description

Configuration Parameters

Definition at line 35 of file arduino_driver.py.


Constructor & Destructor Documentation

def src.arduino_driver.Arduino.__init__ (   self,
  port = "/dev/ttyUSB0",
  baudrate = 57600,
  timeout = 0.5 
)

Definition at line 41 of file arduino_driver.py.


Member Function Documentation

def src.arduino_driver.Arduino.analog_read (   self,
  pin 
)

Definition at line 298 of file arduino_driver.py.

def src.arduino_driver.Arduino.analog_write (   self,
  pin,
  value 
)

Definition at line 301 of file arduino_driver.py.

Close the serial port.

Definition at line 90 of file arduino_driver.py.

Definition at line 62 of file arduino_driver.py.

def src.arduino_driver.Arduino.digital_read (   self,
  pin 
)

Definition at line 304 of file arduino_driver.py.

def src.arduino_driver.Arduino.digital_write (   self,
  pin,
  value 
)

Definition at line 307 of file arduino_driver.py.

def src.arduino_driver.Arduino.drive (   self,
  right,
  left 
)
Speeds are given in encoder ticks per PID interval

Definition at line 277 of file arduino_driver.py.

def src.arduino_driver.Arduino.drive_m_per_s (   self,
  right,
  left 
)
Set the motor speeds in meters per second.

Definition at line 282 of file arduino_driver.py.

def src.arduino_driver.Arduino.execute (   self,
  cmd 
)
Thread safe execution of "cmd" on the Arduino returning a single integer value.

Definition at line 148 of file arduino_driver.py.

def src.arduino_driver.Arduino.execute_ack (   self,
  cmd 
)
Thread safe execution of "cmd" on the Arduino returning True if response is ACK.

Definition at line 218 of file arduino_driver.py.

def src.arduino_driver.Arduino.execute_array (   self,
  cmd 
)
Thread safe execution of "cmd" on the Arduino returning an array.

Definition at line 180 of file arduino_driver.py.

Get the current baud rate on the serial port.

Definition at line 258 of file arduino_driver.py.

Definition at line 263 of file arduino_driver.py.

Open the serial port.

Definition at line 85 of file arduino_driver.py.

def src.arduino_driver.Arduino.pin_mode (   self,
  pin,
  mode 
)

Definition at line 310 of file arduino_driver.py.

def src.arduino_driver.Arduino.ping (   self,
  pin 
)
The srf05/Ping command queries an SRF05/Ping sonar sensor
    connected to the General Purpose I/O line pinId for a distance,
    and returns the range in cm.  Sonar distance resolution is integer based.

Definition at line 325 of file arduino_driver.py.

def src.arduino_driver.Arduino.recv (   self,
  timeout = 0.5 
)

Definition at line 101 of file arduino_driver.py.

This command should not be used on its own: it is called by the execute commands
    below in a thread safe manner.

Definition at line 121 of file arduino_driver.py.

This command should not be used on its own: it is called by the execute commands
    below in a thread safe manner.

Definition at line 138 of file arduino_driver.py.

This command should not be used on its own: it is called by the execute commands
    below in a thread safe manner.

Definition at line 128 of file arduino_driver.py.

Reset the encoder counts to 0

Definition at line 272 of file arduino_driver.py.

def src.arduino_driver.Arduino.send (   self,
  cmd 
)
This command should not be used on its own: it is called by the execute commands
    below in a thread safe manner.

Definition at line 95 of file arduino_driver.py.

def src.arduino_driver.Arduino.servo_read (   self,
  id 
)
Usage: servo_read(id)
    The returned position is converted from degrees to radians

Definition at line 319 of file arduino_driver.py.

def src.arduino_driver.Arduino.servo_write (   self,
  id,
  pos 
)
Usage: servo_write(id, pos)
    Position is given in radians and converted to degrees before sending

Definition at line 313 of file arduino_driver.py.

Stop both motors.

Definition at line 293 of file arduino_driver.py.

def src.arduino_driver.Arduino.update_pid (   self,
  Kp,
  Kd,
  Ki,
  Ko 
)
Set the PID parameters on the Arduino

Definition at line 251 of file arduino_driver.py.


Member Data Documentation

Definition at line 41 of file arduino_driver.py.

Definition at line 41 of file arduino_driver.py.

Definition at line 41 of file arduino_driver.py.

Definition at line 41 of file arduino_driver.py.

Definition at line 41 of file arduino_driver.py.

Definition at line 41 of file arduino_driver.py.

Definition at line 38 of file arduino_driver.py.

Definition at line 39 of file arduino_driver.py.

Definition at line 41 of file arduino_driver.py.

Definition at line 41 of file arduino_driver.py.

Definition at line 41 of file arduino_driver.py.

Definition at line 41 of file arduino_driver.py.

Definition at line 41 of file arduino_driver.py.


The documentation for this class was generated from the following file:


ros_arduino_python
Author(s): Patrick Goebel
autogenerated on Mon Oct 6 2014 06:51:50