You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
434 B
Java
19 lines
434 B
Java
8 years ago
|
/*
|
||
|
Holds stimulus light from screen left on for 10 seconds.
|
||
|
*/
|
||
|
|
||
|
float FrameRate = 30;
|
||
|
int intensity = 0;
|
||
|
|
||
|
|
||
|
void unidirectionStim(int intensity) {
|
||
|
if (t < 180) {
|
||
|
arduino.analogWrite(down, intensity); // Turns on arduino light (can make ledPin into a parameter that is passed in)
|
||
|
} else {
|
||
|
arduino.analogWrite(down, 0);
|
||
|
}
|
||
|
|
||
|
t_temp = t_temp + 1;
|
||
|
t = t_temp / FrameRate;
|
||
|
}
|