Something went wrong on our end
Select Git revision
CommunicationInterface.m
-
Tim Stadtmann authoredTim Stadtmann authored
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
CommunicationInterface.m 75.43 KiB
classdef CommunicationInterface < handle
% Brick Interface to Lego Minstorms EV3 brick
%
% Methods::
% brick Constructor, establishes communications
% delete Destructor, closes connection
% send Send data to the brick
% receive Receive data from the brick
%
%
% uiReadVBatt Returns battery level as a voltage
% uiReadLBatt Returns battery level as a percentage
%
% drawTest Shows the drawing capabilities of the brick
%
%
% soundTest @MMI: Returns state of speaker
% soundReady @MMI: Halts the execution of commands on Brick until speakers are ready
% soundPlayTone Plays a tone at a volume with a frequency and duration
% soundStopTone @MMI: Stops current sound playback
%
% beep Plays a beep tone with volume and duration
% playThreeTone Plays three tones one after the other
%
%
% inputDeviceList @MMI: Returns list of sensor types on each port
% inputDeviceGetName Returns the device name at a layer and NO
% inputDeviceGetTypeMode @MMI: Returns type and mode of device at a layer and NO
% inputDeviceSetTypeMode @MMI: Sets type and mode of device which is recognized by old
% type and mode.
% inputDeviceGetModeName @MMI: Returns the device's mode at a layer and NO
% inputDeviceGetConnection @MMI: Returns the connection type (=sensor type) at a layer and NO
% inputDeviceGetMinMax @MMI: Returns the min and max SI value of device at a layer and NO
% inputDeviceGetChanges @MMI: Returns positive changes(=button releases) since last clear at a layer and NO
% inputDeviceGetFormat @MMI: Returns no. of datasets, returned data type in
% active sensor mode, no. of sensor modes and no. of
% visible sensor modes at a layer and NO
% inputDeviceGetBumps @MMI: Returns negatives changes (=button presses) since last clear at a layer and NO
% inputDeviceSymbol Returns the symbol for the device at a layer, NO and mode
% inputDeviceClrChanges @MMI: Clears changes(&bumps) at a layer and NO
% inputDeviceClrAll Clears all the sensor data at a layer
% inputReady @MMI: Halts the execution of commands on Brick until given devices are ready
% inputTest @MMI: Returns the state of the device at a layer and NO
% inputRead @MMI: Reads a connected sensor at a layer, NO, type and mode in percentage
% inputReadSI Reads a connected sensor at a layer, NO, type and mode in SI units
%
% outputStop Stops motor at a layer, NOS and brake
% outputStopAll Stops all the motors
% outputPower Sets motor output power at a layer, NOS and speed
% outputSpeed @MMI: Sets motor output speed at a layer, NOS and speed
% outputStart Starts motor at a layer, NOS and speed
% outputTest Returns the state of the motor at a layer and NOS
% outputStepSpeed Moves a motor to set position with layer, NOS, speed,
% ramp up angle, constant angle, ramp down angle and brake
% outputStepPower @MMI: Moves a motor to set position with layer, NOS, power,
% ramp up angle, constant angle, ramp down angle and brake
% outputTimeSpeed @MMI: Moves a motor for set time at a layer, NOS, speed,
% ramp up time, constant time, ramp down time and brake
% outputTimePower @MMI: Moves a motor for set time at a layer, NOS, power,
% ramp up time, constant time, ramp down time and brake
% outputStepSync @MMI: Moves two motors synchronized at a layer, NOS,
% power, turn ratio, tacho limit, and brake
% outputTimeSync @MMI: Moves two motors synchronized at a layer, NOS,
% power, turn ratio, time limit, and brake
% outputClrCount Clears a motor tachometer at a layer and NOS
% outputGetCount Returns the tachometer at a layer and NO
% outputReset @MMI:
% outputRead @MMI:
% outputPolarity @MMI: Sets a motor's polarity ('rotational direction')
% outputReady @MMI: Halts the execution of commands on Brick until given