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.
Dependencies: MODSERIAL QEI mbed
Fork of check_motoren_buttons_emg by
Revision 11:757787c47d3c, committed 2016-09-30
- Comitter:
- sivuu
- Date:
- Fri Sep 30 12:34:46 2016 +0000
- Parent:
- 8:432dc3ed8ea3
- Child:
- 12:20b8999018df
- Commit message:
- voordat danique de "s" en 'd' vervangt door knopjes
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Fri Sep 30 10:01:41 2016 +0000
+++ b/main.cpp Fri Sep 30 12:34:46 2016 +0000
@@ -14,6 +14,7 @@
void SwitchN() { // maakt simpele functie die 1 bij n optelt
n++;
}
+
int main()
{
@@ -23,7 +24,9 @@
sw3.fall(&SwitchN); // zorgt er voor dat void switch wordt gedaan als switch 3 wordt ingedrukt
+
char c = pc.getc(); // zorgt ervoor dat er in het toetsenboard characters gebruikt kunnen worden
+ pc.printf("%c \n\r",c);
if (c=='s') // als s ingedrukt wordt gebeurd het volgende
{
@@ -65,9 +68,10 @@
pwm_motor2 = 1;
wait (0.05);
}
- }
- else
- {pwm_motor2=0;
+ }
+ else{
+ pc.printf("motor staat stil \n\r");
+ pwm_motor2=0;
pwm_motor1=0;
}
