writeInt32Array()
Description
Writes an array of signed 32-bit integers to the serial port
Syntax
writeInt32Array(long array, unsigned int size)
Parameters
array: a 1xN array of signed 16-bit integers of type long or int32_t.
size: the number of bytes to send from the array (must not exceed array length)
Returns
None
Example
% This writes an int32 array to the serial port for MATLAB to read
#include "ArCOM.h" // Include ArCOM library
ArCOM serialPort; // Create serial port object
long myInts[3] = {333, -444444, 555}; // Create an int32 array
void setup() {
SerialUSB.begin(115200); // Initialize USB serial port
}
void loop() {
// Send the int32 array to MATLAB
serialPort.writeInt32Array(myInts, 3);
}