极客工坊

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9717|回复: 0

arduino读取单片机4位16进制数据

[复制链接]
发表于 2014-9-24 00:40:35 | 显示全部楼层 |阅读模式
unsigned char hexdata[4];void setup()  {


Serial.begin(4800);

  }
void loop(
{

    if(Serial.available())
    { hexdata[4]=Serial.read();
     
      
   
  Serial.print(hexdata[4],HEX);

   
    }
   
}请教各位 我用一块单片机串口与arduino通信   arduino读取单片机4位16进制数据比如0xff 0x02 0x00 0xfe ,怎么串口显示2FF?
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|联系我们|极客工坊

GMT+8, 2026-6-8 10:41 , Processed in 0.033985 second(s), 18 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表