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: HIDScope MODSERIAL- mbed-dsp mbed
Diff: Project_main.cpp
- Revision:
- 31:d8eaf0ce8517
- Parent:
- 30:5e5098b0cca6
- Child:
- 32:aaf01b1bf05d
--- a/Project_main.cpp Mon Oct 06 13:21:55 2014 +0000
+++ b/Project_main.cpp Mon Oct 06 13:27:01 2014 +0000
@@ -36,7 +36,7 @@
uint16_t emg_trivalue;
emg_trivalue = emg1.read_u16(); // read direct ADC result (0..4096 = 0..3.3V) biceps
- /*send value to PC. Line below is used to prevent buffer overrun */
+ /*send value to PC. Line below is used to prevent buffer overrun */
if(pc.rxBufferGetSize(0)-pc.rxBufferGetCount() > 30) { //VRAAG: praktisch nut hiervan? print emg value wanneer buffercount groter dan 30 is
//pc.printf("%u\n",emg_bivalue);
}
@@ -47,14 +47,16 @@
scope.send();
}
-void resetlooper(){
+void resetlooper()
+{
if(emg_trifloat.read()>0.8 && direction != 0) { //dit is alleen mogelijk wanneer directionchoice is gemaakt
direction = 0;
force = 0; // WEGHALEN, wanneer in uiteindelijke script na force keuzen niet meer gereset kan worden (voor nu wel handig)
- goto directionchoice;
- }
+ pc.printf("reset ");
+ goto directionchoice; //<--- dit kan NATUURLIJK NIET, dus iets wat vervolgens checked of directionchoice en/of force is bepaald in de mainloop en dan een goto maken
+ }
}
-
+
int main()
{
pc.baud(115200); //baudrate instellen