ModuleWrite()

Description

Writes values to a Bpod module, via its serial connection to the state machine. (i.e. MATLAB --> State Machine --> Module)

Syntax

ModuleWrite(ModuleName, Values, [Datatype])

Parameters

  • ModuleName: The module's name (a character array). See BpodSystem.Modules for the names of connected modules.

  • Values: Value(s) to send to the module. By default, values are 'uint8'.

  • (optional) DataType: An integer data type. Supported types are:

    • uint8

    • uint16

    • uin32

    • int8

    • int16

    • int32

Returns

  • None

Examples

% Example1: Sends the character array "Hi there" via the state machine, to EchoModule1

ModuleWrite('EchoModule1', 'Hi there');


% Example2: Sends two 32-bit integers to SillyModule2

ModuleWrite('SillyModule2', [102483 297438], 'uint32');