This program is to help people
Dependencies: MMA8451Q USBDevice mbed
Fork of USB_Mouse by
Diff: main.cpp
- Revision:
- 2:19fae3417fa1
- Parent:
- 1:69b4787b6f1f
--- a/main.cpp Wed Sep 24 16:04:05 2014 +0000 +++ b/main.cpp Wed Sep 24 21:59:45 2014 +0000 @@ -26,14 +26,16 @@ int main(void) { - int sensiblity=100; //This is sensibility and this will be a parameter to configurate by the users + int sensiblity=100; //This is sensibility and this will be a parameter to configurate by the users while(1) { //This is a infinite loop to reset the program - + + wait(1); //Time what you have to wait to do the next selection + while (1) { - - wait(1); //Time what you have to wait to do the next selection - + + + gLED = LED_OFF;// Red led is off rLED = LED_OFF;// Green led is off @@ -80,13 +82,13 @@ if(sensorData.accValX>=.3) { // This part is true when the user move the FRD enought to select only clic - mouse.click(MOUSE_LEFT); + mouse.click(MOUSE_RIGHT); gLED = LED_OFF; rLED = LED_ON; } else { // The oposite part of the other one is that the user select double clic - mouse.click(MOUSE_RIGHT); + mouse.click(MOUSE_LEFT); gLED = LED_ON; rLED = LED_OFF; }