Nydrel Jack
/
418_Lab2_Part6
Controlling DC motor using relay
Revision 0:d3908e6d31cb, committed 2018-02-14
- Comitter:
- Nydrel
- Date:
- Wed Feb 14 09:04:32 2018 +0000
- Commit message:
- Changed GPIO pin to p17
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 |
diff -r 000000000000 -r d3908e6d31cb main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed Feb 14 09:04:32 2018 +0000 @@ -0,0 +1,16 @@ +#include "mbed.h" + +DigitalOut myled(LED1); +DigitalOut Ctrl(p17); + +int main() { + while(1) { + Ctrl = 1; + myled = 1; + wait(2); + Ctrl = 0; + myled = 0; + wait(2); + } +} + \ No newline at end of file
diff -r 000000000000 -r d3908e6d31cb mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Wed Feb 14 09:04:32 2018 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/7130f322cb7e \ No newline at end of file