if (FALSE) {
# Set up the MAIA
chooseOpi("MAIA")
result <- opiInitialize(ip = "192.168.1.7", port = 44965)
if (!is.null(result$err))
stop("Initialisation failed")
#' @param x X location of stim in degrees
#' @param y Y location of stim in degrees
#' @param size If 3, Goldmann III, else V
#' @param db Value in dB
#' @return stim object ready for opiPresent
makeStim <- function(x, y, size, db) {
s <- list(x = x, y = y, level = dbTocd(db, 10000 / pi),
size = ifelse(size == 3, 0.43, 1.77),
duration = 200, responseWindow = 1500)
class(s) <- "opiStaticStimulus"
return(s)
}
result <- opiPresent(makeStim(9, 9, 3, 10))
}
Run the code above in your browser using DataLab