fast-feedback virtual target task code on STM Nucleo

Dependencies:   mbed

Committer:
gwappa
Date:
Thu Jul 05 20:15:37 2018 +0000
Revision:
26:b4421d1ee57a
Parent:
20:4c06d3041337
Child:
27:b31ea8d74f9e
transform event feature into the InterruptHandler class; organize files a little bit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
gwappa 3:991c6d5ce19d 1 #include "rig.h"
gwappa 11:897ecd5413e0 2 #include "utils.h"
gwappa 26:b4421d1ee57a 3 #include "arduinopins.h"
gwappa 3:991c6d5ce19d 4
gwappa 3:991c6d5ce19d 5 // the task timer
gwappa 3:991c6d5ce19d 6 Timer timer;
gwappa 3:991c6d5ce19d 7
gwappa 3:991c6d5ce19d 8 // state time out
gwappa 3:991c6d5ce19d 9 Timeout stateTimeout;
gwappa 3:991c6d5ce19d 10
gwappa 3:991c6d5ce19d 11 // input
gwappa 26:b4421d1ee57a 12 InterruptHandler gateIn(ARDUINO_11);
gwappa 26:b4421d1ee57a 13 InterruptHandler whiskIn(ARDUINO_12); // or USER_BUTTON
gwappa 26:b4421d1ee57a 14 InterruptHandler lickIn(ARDUINO_13); // or USER_BUTTON
gwappa 3:991c6d5ce19d 15
gwappa 3:991c6d5ce19d 16 // output
gwappa 20:4c06d3041337 17 Pulse audioOut(ARDUINO_A0); // or LED1
gwappa 12:06ea96546af1 18 Pulse visualOut(ARDUINO_A1); //
gwappa 12:06ea96546af1 19 Pulse rewardOut(ARDUINO_A2); //
gwappa 9:e136394bdb39 20
gwappa 12:06ea96546af1 21 Pulse trialStart(ARDUINO_A3, ms_to_us(TRIGGER_DUR_MS)); // or any other pin
gwappa 12:06ea96546af1 22 Pulse trialEnd(ARDUINO_A4, ms_to_us(TRIGGER_DUR_MS)); //
gwappa 3:991c6d5ce19d 23
gwappa 3:991c6d5ce19d 24 Task task(Pair);
gwappa 3:991c6d5ce19d 25 Trial trial;