Extender
  • Extender Manual
  • Introduction
    • Safety Precautions
    • Specifications
    • Regulatory Compliance
    • What's in the box
    • External features
    • System requirements
  • Getting started
    • Syncing real-time clock
    • Updating firmware
    • Formatting SD Card
  • Modes of operation
    • Power only mode and Trigger Input
    • SD card recording mode
    • Pass-through mode
    • USB drive mode
  • Extender Details
    • Extender Button Functionality
    • Extender LED Functionality
    • Extender Charging
  • Hardware Triggering
    • Trigger Input & Cable
    • Example 1: 1s Pulses
    • Example 2: Serial Triggering
    • Example 3: MATLAB
  • Data Access
    • Downloading recordings
    • Decrypting recordings
    • Exported data format
  • Troubleshooting
    • Hardware Reset
Powered by GitBook
On this page
  1. Hardware Triggering

Example 3: MATLAB

PreviousExample 2: Serial TriggeringNextData Access

Last updated 5 years ago

The third example below shows how it is possible to install hardware support for Arduino into Matlab using the hardware support package and then directly control the output pin connected to the Extender.

  1. Download and install Arduino Hardware support package on MATLAB.

  2. Connect the Arduino board to the PC. To establish a connection between MATLAB and Arduino boards, the following command can be used from MATLAB:

    >> a = arduino
  3. The arduino support package can control the arduino in multiple different ways. For this example we are using Digital pin 9 and using the writeDigitalPin command. See example below.

    writeDigitalPin(a, D9, 1)
    writeDigitalPin(a, D9, 0)

This will create a rising edge which will trigger the extender port. You can incorporate this into your code.