Haply hAPI  V4.0
Haply Haptic API
Pwm Class Reference

Public Member Functions

 Pwm ()
 
 Pwm (int pin, float pulseWidth)
 
void set_pin (int pin)
 
void set_pulse (float percent)
 
int get_pin ()
 
int get_value ()
 
float get_pulse ()
 

Constructor & Destructor Documentation

◆ Pwm() [1/2]

Pwm.Pwm ( )

Constructs an empty PWM output for use

◆ Pwm() [2/2]

Pwm.Pwm ( int  pin,
float  pulseWidth 
)

Constructs a PWM output at the specified pin and at the desired percentage

Parameters
pinpin to output pwm signal
pulseWidthpercent of pwm output, value between 0 to 100

Member Function Documentation

◆ get_pin()

int Pwm.get_pin ( )
Returns
pin pwm signal is outputting

◆ get_pulse()

float Pwm.get_pulse ( )
Returns
percent value of pwm signal

◆ get_value()

int Pwm.get_value ( )
Returns
raw value of pwm signal between 0 to 255

◆ set_pin()

void Pwm.set_pin ( int  pin)

Set pin parameter of pwm

Parameters
pinpin to output pwm signal

◆ set_pulse()

void Pwm.set_pulse ( float  percent)

Set value variable of pwm


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