writeInt32()

writeInt32()

Description

Writes a 32-bit signed integer to the serial port.

Syntax

writeInt16(long myInt)

Parameters

  • myInt: an 32-bit signed integer to write to the serial port, of type long or int32_t.

Returns

None

Example

% This code writes an int32 to the serial port for MATLAB to read

#include "ArCOM.h" // Include ArCOM library

ArCOM serialPort; // Create serial port object

long myInt = -923323; // Create an 32-bit signed integer

void setup() {

SerialUSB.begin(115200); // Initialize USB serial port

}

void loop() {

serialPort.writeInt32(myInt); // Send the int32 to MATLAB

}