Rianne Bulthuis
/
main_cases
main script with all cases
Revision 0:a22aaebca489, committed 2015-10-19
- Comitter:
- riannebulthuis
- Date:
- Mon Oct 19 09:34:36 2015 +0000
- Commit message:
- Nog uitproberen met script voor homeposition. Begin van script met cases.
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 |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Mon Oct 19 09:34:36 2015 +0000 @@ -0,0 +1,22 @@ +#include "mbed.h" + +int main() +{ + while (true) { //constante while loop, anders wordt er na de 1e case niets meer uitgenoevd + pc.baud(9600); //PC baud rate is 9600 bits/seconde + + switch(state){ //Switch benoemen, zorgt ervoor dat de cases in de goede volgorde worden doorlopen + + case start: { //aanzetten + pc.printf("BMT Groep 13\n\r"); //BMT Groep 13 verschijnt op het scherm + lcd.locate(0,0); //Zet de tekst op de eerste regel + lcd.printf("start\n\r") //start verschijnt op het scherm + lcd.locate(0,1); //Zet de tekst op de tweede regel + wait(2); //Wacht twee seconden + lcd.cls(); //maak LCD scherm leeg + state = set_homeposition_arm1; //Door naar de volgende state + break; + } + + case set_homeposition_arm1: { //arm 1 naar homeposition + pc.printf("calibration arm 1\n\r") //Zet de tekst calibration arm 1 op het scherm \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Mon Oct 19 09:34:36 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/34e6b704fe68 \ No newline at end of file