RobotIO Class

The main class through which input and output operations are performed with devices and components connected to the Arduino.

Definition

Namespace: RoboTx.Api
Assembly: RoboTx.Api (in RoboTx.Api.dll) Version: 1.0.0
C#
public class RobotIO : IDisposable
Inheritance
Object    RobotIO
Implements
IDisposable

Constructors

RobotIO(String) Constructs an instance using a serial port name, 57600 baud rate and data terminal ready as false.
RobotIO(String, Int32, Boolean) Constructs an instance using a serial port name, baud rate and data terminal ready settings.

Properties

Analog Allows for configuring of analog input, and exposing analog readings.
ColourSensor Reports values read using TCS34725 sensor.
ConnectionState Informs the connected state of the computer with the Arduino.
Digital Exposes digital input readings.
Display Sends text output to the LCD display.
LedDisplay Writes a string to the 7 segment LED display.
Motor1 Controls speed and direction of motor 1.
Motor2 Controls speed and direction of motor 2.
MotorConfig Configuration options for DC motors.
PulseCounter Calculates period of input pulses on a designated Arduino pin.
Servo1 Sets the range and position of servo motor 1.
Servo2 Sets the range and position of servo motor 2.
Servo3 Sets the range and position of servo motor 3.
Servo4 Sets the range and position of servo motor 4.
ServoConfig Configuration options for servo motors.
Sonar Uses sonar to calculate distance by sending a ping and measuring the time lapsed before receiving the echo.
Switch1 Sets a digital output to on or off.
Switch2 Sets a digital output to on or off.
Switch3 Sets a digital output to on or off.
Switch4 Sets a digital output to on or off.
Trigger A digital trigger for generating repeating pulse cycle patterns.

Methods

Close Closes connection with Arduino. DC motors and servo motors will be disabled, the digital trigger and digital switches will turn off, and the LED display will clear.
Connect Initiates serial connection with Arduino using port and baud rates specified in constructor.
Dispose Closes connection with the Arduino and releases resources.
Dispose(Boolean) Closes connection with the Arduino and releases resources.
GetIRCommand Gets the value and pressed state of an IR command button if one has been received by pressing a button on an IR remote control.
NotifyClosing The method should be called in the main application to signal to background threads monitoring property IsClosing that they should terminate gracefully.

See Also