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:1be186a0b596, committed 2018-05-24
- Comitter:
- tyynetyyne
- Date:
- Thu May 24 08:22:07 2018 +0000
- Commit message:
- traffic lights
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
| microbit.lib | Show annotated file Show diff for this revision Revisions of this file |
diff -r 000000000000 -r 1be186a0b596 main.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Thu May 24 08:22:07 2018 +0000
@@ -0,0 +1,19 @@
+#include "MicroBit.h"
+
+MicroBit uBit;
+
+int main()
+{
+ uBit.init();
+ while (1){
+ uBit.io.P2.setDigitalValue(1);
+ uBit.sleep(4000);
+ uBit.io.P1.setDigitalValue(1);
+ uBit.sleep(2000);
+ uBit.io.P2.setDigitalValue(0);
+ uBit.io.P1.setDigitalValue(0);
+ uBit.io.P0.setDigitalValue(1);
+ uBit.sleep(4000);
+ uBit.io.P0.setDigitalValue(0);
+ }
+}
diff -r 000000000000 -r 1be186a0b596 microbit.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/microbit.lib Thu May 24 08:22:07 2018 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/teams/Lancaster-University/code/microbit/#4b89e7e3494f