How do I write bytes to a serial object - to send data over USB-serial XBee to Arduino?
조회 수: 1 (최근 30일)
이전 댓글 표시
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?
댓글 수: 0
채택된 답변
Walter Roberson
2016년 8월 15일
uint8 are bytes . You can fwrite() them directly.
댓글 수: 2
Walter Roberson
2016년 8월 15일
I think that the last time I used a computer whose words were not 8 bits long would have been roughly 1985, the last of my University access to a Honeywell Level/66 . I know some DSPs after used 16 bit bytes and possibly even stranger sizes (especially during the bitsliced era) but I never encountered them myself.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Instrument Control Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!