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