EDU Arduino API
Data Fields
ketCube_Arduino_API_t::PWM Struct Reference

KETCube PWM API. More...

Data Fields

PWM_init_t init
 Inititalize PWM function. More...
 
PWM_tone_t tone
 Generates a square wave of the specified frequency. More...
 

Detailed Description

KETCube PWM API.

Field Documentation

◆ init

PWM_init_t ketCube_Arduino_API_t::PWM::init

Inititalize PWM function.

◆ tone

PWM_tone_t ketCube_Arduino_API_t::PWM::tone

Generates a square wave of the specified frequency.

Parameters
freqfrequency in kHz
durationtone duration in ms
mutemute time following the tone in ms
Note
tones are queued, you can call this function up to 8 times (until you fill the queue) - the tones will be produced sequentialy. If you call this function more than 8 times before queue is freed, (some) tones will be lost