Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
sonar_trigger_echo.ranger Class Reference

List of all members.

Public Member Functions

def __init__
def cancel
def read

Public Attributes

 pi

Private Member Functions

def _cbf

Private Attributes

 _cb
 _echo
 _echo_mode
 _high
 _inited
 _ping
 _time
 _trig
 _trig_mode
 _triggered

Detailed Description

This class encapsulates a type of acoustic ranger.  In particular
the type of ranger with separate trigger and echo pins.

A pulse on the trigger initiates the sonar ping and shortly
afterwards a sonar pulse is transmitted and the echo pin
goes high.  The echo pins stays high until a sonar echo is
received (or the response times-out).  The time between
the high and low edges indicates the sonar round trip time.

Definition at line 7 of file sonar_trigger_echo.py.


Constructor & Destructor Documentation

def sonar_trigger_echo.ranger.__init__ (   self,
  pi,
  trigger,
  echo 
)
The class is instantiated with the Pi to use and the
gpios connected to the trigger and echo pins.

Definition at line 19 of file sonar_trigger_echo.py.


Member Function Documentation

def sonar_trigger_echo.ranger._cbf (   self,
  gpio,
  level,
  tick 
) [private]

Definition at line 45 of file sonar_trigger_echo.py.

Cancels the ranger and returns the gpios to their
original mode.

Definition at line 79 of file sonar_trigger_echo.py.

Triggers a reading.  The returned reading is the number
of microseconds for the sonar round-trip.

round trip cms = round trip time / 1000000.0 * 34030

Definition at line 60 of file sonar_trigger_echo.py.


Member Data Documentation

Definition at line 22 of file sonar_trigger_echo.py.

Definition at line 22 of file sonar_trigger_echo.py.

Definition at line 22 of file sonar_trigger_echo.py.

Definition at line 22 of file sonar_trigger_echo.py.

Definition at line 22 of file sonar_trigger_echo.py.

Definition at line 22 of file sonar_trigger_echo.py.

Definition at line 22 of file sonar_trigger_echo.py.

Definition at line 22 of file sonar_trigger_echo.py.

Definition at line 22 of file sonar_trigger_echo.py.

Definition at line 22 of file sonar_trigger_echo.py.

Definition at line 22 of file sonar_trigger_echo.py.


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


cob_hand_bridge
Author(s): Mathias Lüdtke
autogenerated on Thu Jun 6 2019 20:43:57