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.
Fork of RelayMD_lib_sample by
Revision 1:19df9d83a651, committed 2018-09-07
- Comitter:
- skouki
- Date:
- Fri Sep 07 02:52:09 2018 +0000
- Parent:
- 0:9db257a8b863
- Commit message:
- ver2-sample
Changed in this revision
| RelayMD.lib | Show annotated file Show diff for this revision Revisions of this file |
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/RelayMD.lib Fri Sep 07 02:25:55 2018 +0000 +++ b/RelayMD.lib Fri Sep 07 02:52:09 2018 +0000 @@ -1,1 +1,1 @@ -https://os.mbed.com/users/skouki/code/RelayMD/#b80323759d37 +https://os.mbed.com/users/skouki/code/RelayMD/#d556a6067bd4
--- a/main.cpp Fri Sep 07 02:25:55 2018 +0000
+++ b/main.cpp Fri Sep 07 02:52:09 2018 +0000
@@ -2,12 +2,13 @@
#include "RelayMD.h"
RelayMD motor(D11,D10,D9);
-
+DigitalOut led(LED2);
int main(){
while(true){
- motor.SetPower(0.5);
+ led = !led;
+ motor = 1;
wait(1);
- motor.SetPower(-0.5);
+ motor = 0.5;
wait(1);
}
-}
\ No newline at end of file
+}
