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:7dbebfd13cc3, committed 2011-08-27
- Comitter:
- fusamoto
- Date:
- Sat Aug 27 02:35:27 2011 +0000
- Commit message:
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 Sat Aug 27 02:35:27 2011 +0000
@@ -0,0 +1,29 @@
+#include "mbed.h"
+
+DigitalOut myleds[] = {DigitalOut(LED1),DigitalOut(LED2),DigitalOut(LED3)/*,DigitalOut(LED4)*/};
+PwmOut myled4(LED4);
+
+int main() {
+ while(1) {
+ for(int i=0;i < 3;i++)
+ {
+ myleds[i] = 1;
+ wait(0.2);
+ myleds[i] = 0;
+ wait(0.2);
+ }
+ float p =0.0f;
+ for(float p=0.0f; p < 1.0f;p+=0.1f)
+ {
+ myled4 = p;
+ wait(0.1);
+ }
+ float p2=1.0f;
+ for(; p2 > 0.0f;p2-=0.1f)
+ {
+ myled4 = p2;
+ wait(0.1);
+ }
+ myled4 = 0.0f;
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Sat Aug 27 02:35:27 2011 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/63bcd7ba4912