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:cfb1fcccadd6, committed 2020-02-10
- Comitter:
- Mikebob
- Date:
- Mon Feb 10 10:54:40 2020 +0000
- Commit message:
- new file
Changed in this revision
| clickers.cpp | Show annotated file Show diff for this revision Revisions of this file |
| clickers.h | Show annotated file Show diff for this revision Revisions of this file |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/clickers.cpp Mon Feb 10 10:54:40 2020 +0000
@@ -0,0 +1,16 @@
+#include "mbed.h"
+#include "motor.h"
+#include "clickers.h"
+
+extern DigitalIn microswitch1; //Instance of the DigitalIn class called 'microswitch1'
+extern DigitalIn microswitch2; //Instance of the DigitalIn class called 'microswitch2'
+extern Motor Wheel;
+void RevStop()
+{
+ microswitch1.read();
+ while (microswitch1 == true)
+ {
+ microswitch1.read();
+ Wheel.Stop();
+ }
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/clickers.h Mon Feb 10 10:54:40 2020 +0000 @@ -0,0 +1,8 @@ +#ifndef _CLICKERS_H_ +#define _CLICKERS_H_ +#include "mbed.h" + +//functions +void RevStop(void); + +#endif \ No newline at end of file