Robotic_winteam / Mbed 2 deprecated Nucleo_pwmdecoder

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
ooseausername
Date:
Wed May 25 06:03:39 2016 +0000
Parent:
0:97b4f9625db2
Commit message:
ENCORDER

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Tue May 24 14:16:46 2016 +0000
+++ b/main.cpp	Wed May 25 06:03:39 2016 +0000
@@ -1,24 +1,13 @@
 #include "mbed.h"
 
-PwmOut mypwm(PWM_OUT);
-
-DigitalOut myled(LED1);
-
-int main() {
-    
+int main() 
+    {
     mypwm.period_ms(10);
-    mypwm.pulsewidth_ms(1);
-  
-    printf("pwm set to %.2f %%\n", mypwm.read() * 100);
-    
-    while(1) {
-        myled = !myled;
-        wait(1);
+    mypwm.pulsewidth_ms(1);  
     }
-}
+
 void _ISR _U2RXInterrupt(void)
 {
-
 static char Temp;
 Temp=U2RXREG;
 if (Receive_Flag==1)
@@ -42,8 +31,7 @@
 Receive_Data[0]= Temp;
 }
 else
-{
-}
+{}
 }
 IFS1bits.U2RXIF=0;
 }