MATLAB Examples

engduino

Setup connection to Engduino hardware via USB or Bluetooth and create an Engduino Object

Contents

Syntax

e = engduino()
e = engduino(port)
e = engduino(port,baudrate)
e = engduino('Bluetooth',device_name)

Description

e = engduino() Automatically search through the available COM ports and try to connect on one
e = engduino(port) Creates a connection to Engduino hardware on the specified port with the default 9600 baudrate
e = engduino(port,baudrate) Creates a connection to Engduino hardware on the specified port with the specified baudrate
e = engduino('Bluetooth',device_name) Creates a bluetooth communication to Engduino hardware on the specified device. (Additional bluetooth module is required)

Examples

  • Connect to Engduino hardware automatically
  • Automatically find available COM port and connect to one.

    e = engduino();
    

  • Connect to Engduino hardware on a specified port
  • Connect to Engduino hardware on port 3

    e = engduino('COM3');
    

  • Connect to Engduino hardware on a specified port with specified baudrate
  • Connect to Engduino hardware on port 3 with 115200 baudrate

    e = engduino('COM3',115200);
    

  • Connect to Engduino hardware via Bluetooth
  • Connect to Engduino hardware via Bluetooth with the device 'HC-05'

    e = engduino('Bluetooth','HC-05');
    

    Input Arguments

    port (String) Hardware port
    baudrate (Integer) Serial communication speed
    device_name (String) Name of the bluetooth module

    Output Arguments

    e (Object) Communition with Engduino returned as an object