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: USBDevice ResonseBox mbed
Fork of USBKeyboard_HelloWorld by
Diff: main.cpp
- Revision:
- 7:379b9dd31f5f
- Parent:
- 5:03a4211d593a
--- 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
