pyparts.platforms.pwm.raspberrypi_pwm
index
/home/sean/src/python/pyparts/src/pyparts/platforms/pwm/raspberrypi_pwm.py

 
Modules
       
pyparts.platforms.pwm.base_pwm
RPi.GPIO

 
Classes
       
pyparts.platforms.pwm.base_pwm.BasePWM(__builtin__.object)
RaspberryPiPWMOutput

 
class RaspberryPiPWMOutput(pyparts.platforms.pwm.base_pwm.BasePWM)
    Raspberry Pi implementation of a PWM peripheral.
 
Attributes:
  _pwm_pin: DigitalOutput. The pin being used for PWM.
 
 
Method resolution order:
RaspberryPiPWMOutput
pyparts.platforms.pwm.base_pwm.BasePWM
__builtin__.object

Methods defined here:
__init__(self, output_pin, frequency_hz=2000)
Creates a PWM output on a DigitalOutput pin.
 
Args:
  output_pin: DigitalOutput. A DigitalOutput pin to use for PWM output.
  frequency_hz: Float. PWM frequency to use. (default=2000)

Data and other attributes defined here:
__abstractmethods__ = frozenset([])

Methods inherited from pyparts.platforms.pwm.base_pwm.BasePWM:
disable(self)
Disables the PWM output.
enable(self)
Enables the PWM output.
set_duty_cycle(self, duty_cycle)
Sets the duty cycle of the PWM output.
 
Args:
  duty_cycle: Float from 0.0 to 100.0. Duty cycle to set the PWM output to.
 
Raises:
  ValueError: Thrown if duty_cycle is not between 0.0 and 100.0
set_frequency_hz(self, frequency_hz)
Sets the PWM frequency used for PWM output.
 
Args:
  frequency_hz: Float. The frequency to set the PWM output to.
 
Raises:
  ValueError: Thrown if the frequency is negative.

Data descriptors inherited from pyparts.platforms.pwm.base_pwm.BasePWM:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)
duty_cycle
Gets the current value for the PWM output's duty cycle.
 
Returns:
  The current duty cycle as a float.
frequency_hz
Gets the current frequency used by the PWM output.
 
Returns:
  The current frequency in Hertz as a float.
is_enabled
Checks if the PWM output is enabled.
 
Returns:
  True if the PWM output is enabled, Flase otherwise.
pin_number
Gets the pin number of the PWM output.
 
Returns:
  The pin number as an integer.

Data and other attributes inherited from pyparts.platforms.pwm.base_pwm.BasePWM:
__metaclass__ = <class 'abc.ABCMeta'>
Metaclass for defining Abstract Base Classes (ABCs).
 
Use this metaclass to create an ABC.  An ABC can be subclassed
directly, and then acts as a mix-in class.  You can also register
unrelated concrete classes (even built-in classes) and unrelated
ABCs as 'virtual subclasses' -- these and their descendants will
be considered subclasses of the registering ABC by the built-in
issubclass() function, but the registering ABC won't show up in
their MRO (Method Resolution Order) nor will method
implementations defined by the registering ABC be callable (not
even via super()).