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:9d24d00cefce, committed 2018-10-04
- Comitter:
- jennifersouthern
- Date:
- Thu Oct 04 15:47:38 2018 +0000
- Commit message:
- lab 2 ex4
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 Thu Oct 04 15:47:38 2018 +0000
@@ -0,0 +1,20 @@
+#include "mbed.h"
+
+DigitalOut redled(p23);
+DigitalOut greenled(p24);
+DigitalOut yellowled(p22);
+
+
+int main() {
+ while(1) { //repeat indefinitely while true
+ redled = 1; //turn on red led
+ wait(1.0); //wait 1s
+ redled = 0; //turn off red led
+ yellowled = 1; //turn on yellow led
+ wait(1.0); //wait 1s
+ yellowled = 0; //turn off yellow led
+ greenled = 1; //turn on green led
+ wait(1.0); //wait 1s
+ greenled = 0; //turn off green led
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu Oct 04 15:47:38 2018 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/e95d10626187 \ No newline at end of file