Opticka 2.16.1
Opticka is an experiment manager for behavioral research.
Loading...
Searching...
No Matches
arduinoIOPort Class Reference

arduinoIOPort - modified legacy ardino interface using PTB IOPort interface for serial communication and adding a new timedTTL function for asynchronous TTL output (i.e. returns immediately to MATLAB even if the TTL is for a long time). More...

Detailed Description

arduinoIOPort - modified legacy ardino interface using PTB IOPort interface for serial communication and adding a new timedTTL function for asynchronous TTL output (i.e. returns immediately to MATLAB even if the TTL is for a long time).

Inheritance diagram for arduinoIOPort:

Public Member Functions

function arduinoIOPort (in port, in endPin, in startPin)
 
function delete (in a)
 
function close (in a)
 
function pinMode (in a, in pin, in str)
 
function digitalRead (in a, in pin)
 
function digitalWrite (in a, in pin, in val)
 
function analogRead (in a, in pin)
 
function analogWrite (in a, in pin, in val)
 
function timedTTL (in a, in pin, in time)
 
function strobeWord (in a, in value)
 
function analogReference (in a, in str)
 
function roundTrip (in a, in byte, in verbose)
 
function configure (in a, in params)
 
function disp (in a)
 
function checkSketch (in a)
 
function rawCommand (in a, in str)
 
function serialRead (in a)
 
function bytesAvailable (in a)
 
function purge (in a)
 
function flush (in a)
 
function checkPorts (in a, in port)
 

Static Public Member Functions

static function cleanup (in in)
 

Public Attributes

Property port
 
Property endPin
 
Property startPin
 
Property params
 
Property verbose
 

Constructor & Destructor Documentation

◆ arduinoIOPort()

function arduinoIOPort::arduinoIOPort ( in  port,
in  endPin,
in  startPin 
)

Member Function Documentation

◆ analogRead()

function arduinoIOPort::analogRead ( in  a,
in  pin 
)

◆ analogReference()

function arduinoIOPort::analogReference ( in  a,
in  str 
)

◆ analogWrite()

function arduinoIOPort::analogWrite ( in  a,
in  pin,
in  val 
)

◆ bytesAvailable()

function arduinoIOPort::bytesAvailable ( in  a)

◆ checkPorts()

function arduinoIOPort::checkPorts ( in  a,
in  port 
)

◆ checkSketch()

function arduinoIOPort::checkSketch ( in  a)

◆ cleanup()

static function arduinoIOPort::cleanup ( in  in)
static

◆ close()

function arduinoIOPort::close ( in  a)

◆ configure()

function arduinoIOPort::configure ( in  a,
in  params 
)

◆ delete()

function arduinoIOPort::delete ( in  a)

◆ digitalRead()

function arduinoIOPort::digitalRead ( in  a,
in  pin 
)

◆ digitalWrite()

function arduinoIOPort::digitalWrite ( in  a,
in  pin,
in  val 
)

◆ disp()

function arduinoIOPort::disp ( in  a)

◆ flush()

function arduinoIOPort::flush ( in  a)

◆ pinMode()

function arduinoIOPort::pinMode ( in  a,
in  pin,
in  str 
)

◆ purge()

function arduinoIOPort::purge ( in  a)

◆ rawCommand()

function arduinoIOPort::rawCommand ( in  a,
in  str 
)

◆ roundTrip()

function arduinoIOPort::roundTrip ( in  a,
in  byte,
in  verbose 
)

◆ serialRead()

function arduinoIOPort::serialRead ( in  a)

◆ strobeWord()

function arduinoIOPort::strobeWord ( in  a,
in  value 
)

◆ timedTTL()

function arduinoIOPort::timedTTL ( in  a,
in  pin,
in  time 
)

Member Data Documentation

◆ endPin

Property arduinoIOPort::endPin

◆ params

Property arduinoIOPort::params

◆ port

Property arduinoIOPort::port

This class defines an "arduino" object, MATLAB Legacy toolbox. Giampiero Campa, Aug 2013, Copyright 2013 The MathWorks, Inc. This version uses IOPort from PTB, as it is faster: https://psychtoolbox.discourse.group/t/serial-port-interface-code-a-performance-comparison/3781 Also added a timedTTL function, which performs the TTL timing on the arduino and allows PTB to continue its display loop without interupption. Requires a compatible arduino sketch: https://github.com/iandol/opticka/blob/master/communication/arduino/adio/adio.ino

We also define a startPin and endPin so we can use it with other boards like the Xiao which has a different pin number...

◆ startPin

Property arduinoIOPort::startPin

◆ verbose

Property arduinoIOPort::verbose

The documentation for this class was generated from the following file: