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

Arduino Manager > Connects and manages arduino communication. By default it connects using arduinoIOPort (much faster than the MATLAB serial port interface) and the adio.ino arduino sketch (the legacy arduino interface by Mathworks), which provide much better performance than MATLAB's current hardware package. More...

Detailed Description

Arduino Manager > Connects and manages arduino communication. By default it connects using arduinoIOPort (much faster than the MATLAB serial port interface) and the adio.ino arduino sketch (the legacy arduino interface by Mathworks), which provide much better performance than MATLAB's current hardware package.

Copyright ©2014-2022 Ian Max Andolina — released: LGPL3, see LICENCE.md

Inheritance diagram for arduinoManager:

Public Member Functions

function arduinoManager (in varargin)
 
function open (in me)
 
function close (in me)
 
function reset (in me)
 
function pinMode (in me, in line, in mode)
 
function analogRead (in me, in line)
 
function analogWrite (in me, in line, in value)
 
function digitalRead (in me, in line)
 
function digitalWrite (in me, in line, in value)
 
function giveReward (in me, in type, in varargin)
 
function sendTTL (in me, in line, in time)
 
function timedTTL (in me, in line, in time)
 
function strobeWord (in me, in value)
 
function stepper (in me, in ndegree)
 
function rwdByDCmotor (in me, in time)
 
function checkPorts (in me)
 
function delete (in me)
 
- Public Member Functions inherited from optickaCore
function optickaCore (in varargin)
 Class constructor.
 
function get fullName (in me)
 
function getALF (in me, in subject, in sessionPrefix, in lab, in create)
 
function findAttributes (in me, in attrName, in attrValue)
 
function findAttributesandType (in me, in attrName, in attrValue, in type)
 find properties of object with specific attributes, for example all properties whose GetAcccess attribute is public and type is logical.
 
function findPropertyDefault (in me, in propName)
 
function clone (in me)
 Use this syntax to make a deep copy of the object, i.e. OBJ_OUT has the same field values, but will not behave as a handle-copy of me anymore.
 
function checkSuperclasses (in List)
 
function editProperties (in me, in properties)
 method to modify a set of properties
 
function setProp (in me, in property, in value)
 method to fast change a particular value. This is useful for use in anonymous functions, like in the state machine.
 
function initialiseGlobals (in me, in doReset, in doOpen)
 
function initialiseSaveFile (in me)
 Initialise Save prefix.
 
function checkPaths (in me)
 checks the paths are valid
 

Public Attributes

Property port
 arduino port, if left empty it will make a guess during open()
 
Property board
 
Property silentMode
 run with no arduino attached, useful for debugging
 
Property verbose
 output logging info
 
Property reward
 
Property availablePins
 
Property device
 
Property delayLength
 
Property shield
 
Property linePWM
 
- Public Attributes inherited from optickaCore
Property name
 object name
 
Property comment
 comment
 
Property verbose
 verbose logging, subclasses must assign this. This is normally logical true/false
 
Property dateStamp
 clock() dateStamp set on construction
 
Property uuid
 universal ID
 
Property paths
 storage of various paths
 
Property fullName
 The fullName is the object name combined with its uuid and class name.
 

Additional Inherited Members

- Static Public Member Functions inherited from optickaCore
static function makeArgs (in args)
 Converts cell args to structure array.
 
static function addDefaults (in args, in defs)
 add default options to arg input
 
static function hasKey (in in, in key)
 check if a struct / object has a propery / field
 
static function getKeys (in device)
 PTB Get key presses, stops key bouncing.
 
- Protected Member Functions inherited from optickaCore
function parseArgs (in me, in args, in allowedProperties)
 Sets properties from a structure or normal arguments pairs, ignores invalid or non-allowed properties.
 
function addArgs (in me, in args)
 
function setPaths (in me)
 Sets properties from a structure or normal arguments pairs, ignores invalid or non-allowed properties.
 
function getFonts (in me)
 set paths for object
 
function toStructure (in me)
 Converts properties to a structure.
 
function getType (in me, in in)
 
function logOutput (in me, in in, in message, in override)
 Give a metaproperty return the likely property class.
 
function salutation (in me, in varargin)
 Prints messages dependent on verbosity.
 
- Protected Attributes inherited from optickaCore
Property cloning
 are we cloning this from another object
 
Property mversion
 Matlab version number, this is transient so it is not saved.
 
Property sansFont
 sans font
 
Property monoFont
 monoFont
 
Property className
 class name
 
Property savePrefix
 save prefix generated from clock time
 
Property fullName_
 cached full name
 

Constructor & Destructor Documentation

◆ arduinoManager()

function arduinoManager::arduinoManager ( in  varargin)

Member Function Documentation

◆ analogRead()

function arduinoManager::analogRead ( in  me,
in  line 
)

◆ analogWrite()

function arduinoManager::analogWrite ( in  me,
in  line,
in  value 
)

◆ checkPorts()

function arduinoManager::checkPorts ( in  me)

◆ close()

function arduinoManager::close ( in  me)

◆ delete()

function arduinoManager::delete ( in  me)

◆ digitalRead()

function arduinoManager::digitalRead ( in  me,
in  line 
)

◆ digitalWrite()

function arduinoManager::digitalWrite ( in  me,
in  line,
in  value 
)

◆ giveReward()

function arduinoManager::giveReward ( in  me,
in  type,
in  varargin 
)

◆ open()

function arduinoManager::open ( in  me)

◆ pinMode()

function arduinoManager::pinMode ( in  me,
in  line,
in  mode 
)

◆ reset()

function arduinoManager::reset ( in  me)

◆ rwdByDCmotor()

function arduinoManager::rwdByDCmotor ( in  me,
in  time 
)

◆ sendTTL()

function arduinoManager::sendTTL ( in  me,
in  line,
in  time 
)

◆ stepper()

function arduinoManager::stepper ( in  me,
in  ndegree 
)

◆ strobeWord()

function arduinoManager::strobeWord ( in  me,
in  value 
)

◆ timedTTL()

function arduinoManager::timedTTL ( in  me,
in  line,
in  time 
)

Member Data Documentation

◆ availablePins

Property arduinoManager::availablePins

specify the available pins to use; 2-13 is the default for an Uno 0-10 for the xiao (though xiao pins 11-14 can control LEDS)

◆ board

Property arduinoManager::board

board type; uno [default] is a generic arduino, xiao is the seeduino xiao pico is RaspberryPi Pico

◆ delayLength

Property arduinoManager::delayLength

◆ device

Property arduinoManager::device

the arduinoIOPort device object, you can call the methods directly if required.

◆ linePWM

Property arduinoManager::linePWM

◆ port

Property arduinoManager::port

arduino port, if left empty it will make a guess during open()

◆ reward

Property arduinoManager::reward

parameters for use when giving rewards via fluid or food actuator, type = TTL / fluid / food / rpi

◆ shield

Property arduinoManager::shield

◆ silentMode

Property arduinoManager::silentMode

run with no arduino attached, useful for debugging

◆ verbose

Property arduinoManager::verbose

output logging info


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