Gerrit Pathuis / Mbed 2 deprecated PwmOut_K64F_Basic

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 /*
00002 Basic test PwmOut on the K64F //
00003 
00004 Possible PwmOut pins are
00005 
00006 PwmOut qq(PTA0);
00007 PwmOut qq(PTA1);
00008 PwmOut qq(PTA2);
00009 
00010 PwmOut qq(PTC2);
00011 PwmOut qq(PTC3);
00012 PwmOut qq(PTC4);
00013 PwmOut qq(PTC10);
00014 PwmOut qq(PTC11);
00015 
00016 PwmOut qq(PTD1);
00017 PwmOut qq(PTD2);
00018 PwmOut qq(PTD3);
00019 */
00020 
00021 #include "mbed.h"
00022 
00023 PwmOut qq(PTA0);        // Scoop connected to this pin and ground
00024 
00025 int main()
00026 {
00027     qq.period(1/100);   // Period set to 100 Hz
00028     qq= 0.50;           // Duty cycle set to 50%           
00029 
00030     while (true) {
00031         // do something
00032     }
00033 }