Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 0:9eaed9723409, committed 2021-09-03
- Comitter:
- CCastrop1012
- Date:
- Fri Sep 03 04:40:18 2021 +0000
- Commit message:
- Se logra el objetivo descrito.
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 |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Fri Sep 03 04:40:18 2021 +0000
@@ -0,0 +1,36 @@
+#include "mbed.h"
+/**
+ Descripción: Controlar el ancho de pulso de una señal cuadrada PWM.
+ con un pulsador en Pull-up y mostrar su variación a travez de un led
+ conectado a un pin con salida PWM de la tarjeta.
+
+*/
+
+PwmOut LED(LED1);
+DigitalIn pulsador(PC_13);
+int T=0;
+
+
+main(){
+while (1)
+{
+
+ while (pulsador == 0)
+ {
+ T++;
+ if (T>2) T=1;
+ wait(0.3);
+ }
+
+ LED.pulsewidth(T);
+ LED.period(4);
+
+///DigitalOut myled(LED1);
+
+//int main() C
+
+ ///SPWM.period_ms(2000);
+ ///SPWM.pulsewidth_ms(1000);
+
+}
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri Sep 03 04:40:18 2021 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/3a7713b1edbc \ No newline at end of file