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:093b0f2b42ee, committed 2019-03-09
- Comitter:
- malithjkd
- Date:
- Sat Mar 09 09:31:49 2019 +0000
- Commit message:
- treetr
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 Mar 09 09:31:49 2019 +0000
@@ -0,0 +1,24 @@
+#include "mbed.h"
+
+PwmOut led(p24);
+Serial pc(USBTX, USBRX); // tx, rx
+//PwmOut PWM1(p24);
+int d = 0;
+
+int main() {
+ led.period(0.01);
+ led = 0.0f;
+ float val = 0.0f;
+ for (int x = 0;x<10;x++){
+ for(val = 0.0f;val<=1;val = val + 0.05f){
+ led = val;
+ wait(.1f);
+ }
+ for(float val = 1.0f;val>=0;val = val - 0.05f){
+ led = val;
+ wait(.1f);
+ }
+ pc.printf("blink test %d\n\r",x);
+ }
+
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Sat Mar 09 09:31:49 2019 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400 \ No newline at end of file