Plot Something - ME 405 Term Project
encoder_agena_chiu.EncoderDriver Class Reference

This class implements a encoder driver for an ME405 kit. More...

Public Member Functions

def __init__ (self, in1pin, in2pin, timer)
 Creates a encoder driver by initializing encoder pins. More...
 
def read (self)
 Reads the encoder position and returns the values. More...
 
def zero (self)
 Sets the encoder reading to zero.
 

Public Attributes

 tim
 The timer variable for the motor.
 
 pin1
 A pin variable to recieve the duty cycles.
 
 pin2
 A pin variable to recieve the duty cycles.
 
 ch1
 The channel variable for channel 1 and pin1.
 
 ch2
 The channel variable for channel 2 and pin2.
 
 pos
 The initial position is set to zero.
 
 past
 The initial past time is set to zero.
 
 current
 The variable that marks the start of the timer.
 
 delta
 The variable that calculates change in time.
 

Detailed Description

This class implements a encoder driver for an ME405 kit.

Constructor & Destructor Documentation

◆ __init__()

def encoder_agena_chiu.EncoderDriver.__init__ (   self,
  in1pin,
  in2pin,
  timer 
)

Creates a encoder driver by initializing encoder pins.

Parameters
in1pinPin 1 to read the encoder.
in2pinPin 2 to read the encoder.
timerTimer to use for encoder channels.

Member Function Documentation

◆ read()

def encoder_agena_chiu.EncoderDriver.read (   self)

Reads the encoder position and returns the values.

Returns
The position of the encoder.

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