MRJJ / clickers

Dependents:   ROCO104_Buggy BuggyDesign

Committer:
Mikebob
Date:
Mon Feb 10 10:54:40 2020 +0000
Revision:
0:cfb1fcccadd6
Child:
1:d5b76569b45c
new file

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Mikebob 0:cfb1fcccadd6 1 #include "mbed.h"
Mikebob 0:cfb1fcccadd6 2 #include "motor.h"
Mikebob 0:cfb1fcccadd6 3 #include "clickers.h"
Mikebob 0:cfb1fcccadd6 4
Mikebob 0:cfb1fcccadd6 5 extern DigitalIn microswitch1; //Instance of the DigitalIn class called 'microswitch1'
Mikebob 0:cfb1fcccadd6 6 extern DigitalIn microswitch2; //Instance of the DigitalIn class called 'microswitch2'
Mikebob 0:cfb1fcccadd6 7 extern Motor Wheel;
Mikebob 0:cfb1fcccadd6 8 void RevStop()
Mikebob 0:cfb1fcccadd6 9 {
Mikebob 0:cfb1fcccadd6 10 microswitch1.read();
Mikebob 0:cfb1fcccadd6 11 while (microswitch1 == true)
Mikebob 0:cfb1fcccadd6 12 {
Mikebob 0:cfb1fcccadd6 13 microswitch1.read();
Mikebob 0:cfb1fcccadd6 14 Wheel.Stop();
Mikebob 0:cfb1fcccadd6 15 }
Mikebob 0:cfb1fcccadd6 16 }