Keyboard based response box for E-prime psychopy etc

Dependencies:   USBDevice ResonseBox mbed

Fork of USBKeyboard_HelloWorld by Samuel Mokrani

Files at this revision

API Documentation at this revision

Comitter:
kanatronics
Date:
Tue Nov 14 13:53:31 2017 +0000
Parent:
6:17871da2a7e4
Child:
8:2304762eba1a
Commit message:
added comments

Changed in this revision

keyTrigger.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keyTrigger.lib	Tue Nov 14 13:53:31 2017 +0000
@@ -0,0 +1,1 @@
+keyTrigger#c1b31c5bc2cb
--- a/main.cpp	Fri Mar 01 13:23:58 2013 +0000
+++ b/main.cpp	Tue Nov 14 13:53:31 2017 +0000
@@ -1,21 +1,25 @@
 #include "mbed.h"
 #include "USBKeyboard.h"
+#include "keyTrigger.h"
+ /*
+Psychology Response box. E-Prime, Psychopy etc timplate QUB
+Kamil Kanas V1I1 14/11/2017
+Tested on Windows 10  for some chipsets USB hub may be required 
+This box has a certain latency determinated by OS and debounce function 
+*/
+
+
+
+
  
-//LED1: NUM_LOCK
-//LED2: CAPS_LOCK
-//LED3: SCROLL_LOCK
-BusOut leds(LED1, LED2, LED3);
- 
-//USBKeyboard
-USBKeyboard keyboard;
- 
+
+
+
 int main(void) {
-    while (1) {
-        keyboard.mediaControl(KEY_VOLUME_DOWN);
-        keyboard.printf("Hello World from Mbed\r\n");
-        keyboard.keyCode('s', KEY_CTRL);
-        keyboard.keyCode(KEY_CAPS_LOCK);
-        wait(1);
-        leds = keyboard.lockStatus();
-    }
-}
\ No newline at end of file
+    for (;;) {           //  forever scan 
+    keyTrigger('0',pin_1,30);                      //charakter '0'
+    keyTrigger('1',pin_2,30);                      //character '1' 
+    
+ }
+}
+         
\ No newline at end of file