Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
juankafil1
Date:
Thu Nov 23 09:34:43 2017 +0000
Commit message:
pwm

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r c667981a5d79 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Nov 23 09:34:43 2017 +0000
@@ -0,0 +1,24 @@
+#include "mbed.h"
+ Serial rs232(USBTX,USBRX);
+PwmOut m(PTA5);
+AnalogIn AN0(PTB0);
+float valor_adc;
+ void motor(){
+     
+   }
+int main() {
+  
+ 
+   while(true){
+   valor_adc=AN0;
+   valor_adc=valor_adc*100;    
+   
+     
+   rs232.printf(" %f\n\r",valor_adc);
+   wait(0.1);
+ 
+        m.period_us(100000);
+        m.pulsewidth_us(2000);
+       wait(0.1);
+       
+}}
diff -r 000000000000 -r c667981a5d79 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Nov 23 09:34:43 2017 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/e7ca05fa8600
\ No newline at end of file