Very simple class to give slow speed PWM using timers and digital out.

Embed: (wiki syntax)

« Back to documentation index

SlowPWM Class Reference

SlowPWM Class Reference

A basic class to create very slow PWM signals using Digital IO and timers. More...

#include <SlowPWM.h>

Public Member Functions

void setPeriod (const float period)
 set the period
void setHighTime (const float highTime)
 set the on time per cycle. If 0 or the period or longer timers are stopped and output set perminently

Detailed Description

A basic class to create very slow PWM signals using Digital IO and timers.

If setting a period and high time then you must manually call start. If setting a duty cycle then it will start automatically, make sure you've set the peiod first if you care about it.

Definition at line 10 of file SlowPWM.h.


Member Function Documentation

void setHighTime ( const float  highTime )

set the on time per cycle. If 0 or the period or longer timers are stopped and output set perminently

Definition at line 24 of file SlowPWM.cpp.

void setPeriod ( const float  period )

set the period

Definition at line 16 of file SlowPWM.cpp.