1 /* Humusoft data acquisition library.
\r
3 * Example that shows using of PWM output channels.
\r
6 /* Copyright 2002-2007 Humusoft s.r.o. */
\r
10 #include "hudaqlib.h"
\r
13 int main(int argc, char* argv[])
\r
18 /* open a handle to the first MF624 device in the system */
\r
19 h = HudaqOpenDevice("MF624", 1, 0);
\r
22 printf("\nData acquisition device not found.\n");
\r
26 /* set first PWM channel to frequency 1.5kHz with duty cycle 0.5 */
\r
27 HudaqPWMWrite(h,0,1500,0.5);
\r
29 /* set second PWM channel to frequency 2.5kHz with duty cycle 0.75 */
\r
30 HudaqPWMWrite(h,1,2500,0.75);
\r
32 /* close the device handle */
\r
33 HudaqCloseDevice(h);
\r