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 5:591e32185bba, committed 2016-11-21
- Comitter:
- Hackerpro
- Date:
- Mon Nov 21 14:30:46 2016 +0000
- Parent:
- 4:0815efcb0008
- Commit message:
- 412 test ok 16/11/21
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Wed Nov 09 12:23:33 2016 +0000
+++ b/main.cpp Mon Nov 21 14:30:46 2016 +0000
@@ -1,12 +1,22 @@
#include "mbed.h"
-DigitalOut myled(LED1);
+#define GREEN_LED PB_0
+#define BLUE_LED PB_7
+#define RED_LED PB_14
+DigitalOut myled1(GREEN_LED);
+DigitalOut myled2(BLUE_LED);
+DigitalOut myled3(RED_LED);
+
int main() {
while(1) {
- myled = 1; // LED is ON
+ myled1 = 1;
+ myled2 = 1;
+ myled3 = 1;
wait(0.2); // 200 ms
- myled = 0; // LED is OFF
+ myled1 = 0;
+ myled2 = 0;
+ myled3 = 0;
wait(1.0); // 1 sec
}
-}
+}
\ No newline at end of file