Arduino 串口发送16进制数据

unsigned char a[236]={
	0XFD,0XFD,0X30,0X03,0X79,0XE3,0X00,0X34,0X64,0X00,
	0XC0,0X00,0X43,0X00,0X1B,0X00,0X15,0X00,0X1B,0X00,
	0X00,0X00,0X15,0X00,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
	0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
	0X01,0X12,0X22,0X12,0X21,0X12,0X12,0X21,0X12,0X11,
	0X22,0X12,0X21,0X22,0X22,0X22,0X22,0X22,0X22,0X22,
	0X22,0X21,0X22,0X12,0X21,0X11,0X22,0X22,0X21,0X11,
	0X12,0X22,0X22,0X22,0X22,0X21,0X22,0X22,0X22,0X22,
	0X22,0X22,0X22,0X22,0X22,0X22,0X22,0X22,0X22,0X22,
	0X22,0X22,0X21,0X11,0X12,0X22,0X13,0XF0,0X00,0X00,
	0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
	0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
	0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
	0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
	0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
	0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
	0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
	0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
	0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
	0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
	0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
	0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
	0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
	0X05,0X76,0X00,0XF9,0XDF,0XDF
};
void setup()
{
	Serial.begin(9600);
	Serial.write(a,236);
}
void loop() {
}

 

你可能感兴趣的:(Arduino基础,串口通信)