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.
Diff: test.cpp
- Revision:
- 0:0da7dd3ebad8
- Child:
- 1:c4b60ff5a79a
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test.cpp Tue Jul 01 08:57:50 2014 +0000
@@ -0,0 +1,51 @@
+#include "mbed.h"
+
+BusOut leds(P1_13, P1_14, P1_22, P0_17, P0_18, P0_19, P1_15, P0_1);
+
+void single(unsigned char bit);
+void all();
+void rotate();
+void takahiro();
+
+int main()
+{
+
+ while(1)
+ {
+ single(0);
+ wait(2);
+ all();
+ all();
+ rotate();
+ rotate();
+ takahiro();
+ takahiro();
+ }
+}
+
+void single(unsigned char bit)
+{
+ leds = 1 << bit;
+}
+
+void all()
+{
+ leds = 0xff;
+ wait(7);
+ leds = 0x00;
+ wait(1);
+}
+
+
+void rotate()
+{
+ int bitt;
+ for(bitt = 0x00; bitt < 10; bitt++)
+ {
+ leds = 1 << bitt;
+ wait(1);
+ }
+}
+void takahiro()
+{
+ }
\ No newline at end of file