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.
Dependencies: mbed
Revision 0:815d6f413875, committed 2019-09-22
- Comitter:
- Javierdf
- Date:
- Sun Sep 22 03:01:08 2019 +0000
- Commit message:
- cambio de color led rgb
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 815d6f413875 main.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Sun Sep 22 03:01:08 2019 +0000
@@ -0,0 +1,49 @@
+#include "mbed.h"
+
+PwmOut ledr(LED1);
+PwmOut ledg(LED2);
+PwmOut ledb(LED3);
+ int r=1000;
+ int g=1000;
+ int b=1000;
+int main() {
+//ledr=0;
+//ledg=0;
+//ledb=0;
+ while(0) {
+
+ ledr.write(0.5);
+ ledr.period_us(r);
+ /*r--;
+ ledr=1;
+ wait_ms(500);
+ ledr=!ledr;
+ if(r==200)
+ {
+ r=1500;
+ }*/
+ }
+ while(0){
+ ledg.write(0.5);
+ ledg.period_us(g);
+ /* g--;
+ ledg=1;
+ wait_ms(500);
+ ledg=!ledg;
+ if(g==200)
+ {
+ g=1500;
+ }*/}
+ while(0){
+ ledb.write(0.5);
+ ledb.period_us(b);
+ /*b--;
+ ledb=1;
+ wait_ms(500);
+ ledb=!ledb;
+ if(b==200)
+ {
+ b=1500;
+ }*/}
+ }
+
diff -r 000000000000 -r 815d6f413875 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Sun Sep 22 03:01:08 2019 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/5571c4ff569f \ No newline at end of file