Description
Sets the definition of the pulse times in a custom train: onset times for pulses, or onset times for bursts of pulses.
Syntax
setCustomTrainTarget(uint8_t channel, uint8_t target)
Parameters
channel: the output channel to adjust
target: 0 if pulse times define pulses, 1 if pulse times define bursts of pulses
Returns
None
Example
// Set output channel 1 to generate 100ms bursts of 1ms, 100Hz pulses at times 0s, 0.3s and 1.0s
float customVoltages[4] = { 5,5,5 };
float customPulseTimes[4] = { 0, 0.3, 1.0 };
uint8_t nPulses = 4;
myPulsePal.setCustomTrainTarget(1,1);
myPulsePal.setCustomTrainID(1,1);
myPulsePal.setPulseDuration(1,0.001);
myPulsePal.setPulseInterval(1,0.009);
myPulsePal.setBurstDuration(1,0.1);
myPulsePal.programCustomTrain(1, nPulses, customPulseTimes, customVoltages); // Program custom pulse train 1