fast-feedback virtual target task code on STM Nucleo

Dependencies:   mbed

rig.cpp

Committer:
gwappa
Date:
2018-05-23
Revision:
4:fcf597f82632
Parent:
3:991c6d5ce19d
Child:
8:973dcd190672

File content as of revision 4:fcf597f82632:

#include "rig.h"

// the task timer
Timer        timer;

// state time out
Timeout      stateTimeout;

// reward time out
Timeout      rewardTimeout;

// input
InterruptIn  whiskIn(USER_BUTTON); // USER_BUTTON or PA_13
InterruptIn  lickIn(PA_14);

// output
DigitalOut   taskOut(LED1); // LED1 or PA_15
DigitalOut   cueOut(PA_4); // LED1 or PA_4
DigitalOut   enableOut(PA_0);
DigitalOut   rewardOut(PA_1);

Task        task(Pair);
Trial       trial;