DigitalWriteSquareWave()

Generate a square wave with the specified output frequency and duration and 50% duty cycle. A duration of 0 causes the square wave to be generate until this function is called again.

Syntax


DigitalWriteSquareWave(unsigned char channel, unsigned long freq, unsigned long duration);

channel
The output channels to write to. Valid channels will depend on the device.

freq
The square wave frequency in Hz.

duration
The duration of the square wave output in mS.

Returns


int status