writeInt8()
writeInt8()
writeInt8()
Description
Writes an 8-bit signed integer to the serial port.
Syntax
writeInt8(int8_t myInt)
Parameters
myInt: an 8-bit signed integer to write to the serial port, of type int8_t.
Returns
None
Example
% This code writes an int8 to the serial port for MATLAB to read
#include "ArCOM.h" // Include ArCOM library
ArCOM serialPort; // Create serial port object
int8_t myInt = -23; // Create an 8-bit signed integer
void setup() {
SerialUSB.begin(115200); // Initialize USB serial port
}
void loop() {
serialPort.writeInt8(myInt); // Send the int8 to MATLAB
}