Very basic PwmOut program on the K64F

Dependencies:   mbed

main.cpp

Committer:
GerritPathuis
Date:
2016-06-21
Revision:
1:cce9c0636038
Parent:
0:100aaea790a0

File content as of revision 1:cce9c0636038:

/*
Basic test PwmOut on the K64F //

Possible PwmOut pins are

PwmOut qq(PTA0);
PwmOut qq(PTA1);
PwmOut qq(PTA2);

PwmOut qq(PTC2);
PwmOut qq(PTC3);
PwmOut qq(PTC4);
PwmOut qq(PTC10);
PwmOut qq(PTC11);

PwmOut qq(PTD1);
PwmOut qq(PTD2);
PwmOut qq(PTD3);
*/

#include "mbed.h"

PwmOut qq(PTA0);        // Scoop connected to this pin and ground

int main()
{
    qq.period(1/100);   // Period set to 100 Hz
    qq= 0.50;           // Duty cycle set to 50%           

    while (true) {
        // do something
    }
}