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: main.cpp
- Revision:
- 1:55c209e14e75
- Parent:
- 0:3f81076404ad
- Child:
- 2:b261cb3cafcf
--- a/main.cpp Thu Nov 16 10:18:43 2017 +0000
+++ b/main.cpp Wed Mar 07 10:31:13 2018 +0000
@@ -3,6 +3,8 @@
DigitalOut M3_DIR (D4);
DigitalIn button1(SW3);
DigitalIn button2(SW2);
+DigitalIn ButtonClockwise(D2);
+DigitalIn ButtonAnticlockwise(D3);
PwmOut M3 (D5);
DigitalOut led_red_base(LED_RED);
@@ -15,7 +17,7 @@
while(true) {
- if(button1)
+ if(ButtonClockwise)
{
M3.write(0.0f);
}
@@ -25,7 +27,7 @@
M3_DIR.write(1);
}
- if(button2)
+ if(ButtonAnticlockwise)
{
M3.write(0.0f);
}