fast-feedback virtual target task code on STM Nucleo

Dependencies:   mbed

rig.cpp

Committer:
gwappa
Date:
2018-07-21
Revision:
27:b31ea8d74f9e
Parent:
26:b4421d1ee57a
Child:
28:797536a42b9f

File content as of revision 27:b31ea8d74f9e:

#include "rig.h"
#include "utils.h"
#include "arduinopins.h"

// the task timer
Timer        timer;

// input
InterruptHandler  gateIn(ARDUINO_11);
InterruptHandler  whiskIn(ARDUINO_12);   // or USER_BUTTON
InterruptHandler  lickIn(ARDUINO_13);    // or USER_BUTTON

// output
Pulse        audioOut(ARDUINO_10);    // or LED1
Pulse        visualOut(ARDUINO_A1); // 
Pulse        rewardOut(ARDUINO_A2); //

Pulse        trialStart(ARDUINO_A3, ms_to_us(TRIGGER_DUR_MS));   // or any other pin
Pulse        trialEnd(ARDUINO_A4,   ms_to_us(TRIGGER_DUR_MS));   // 

Task        task(Pair);
Trial       trial;