MATLAB: How to write bytes to a serial object – to send data over USB-serial XBee to Arduino

serial xbee byte

I am trying to send NMEA messages as data over USB-serial XBee to Arduino to control a robot.
I can open a Serial object and send data from my PC – observing it with another PC and XCTU.
What is the best way to convert the numeric values (uint8) to bytes, and then write them via a Serial objects?

Best Answer

uint8 are bytes . You can fwrite() them directly.
Related Question