เมื่อฉันต้องการส่งอาร์เรย์ไบต์บนสตรีมพอร์ตอนุกรมด้วย java บนอุปกรณ์ปลายทางฉันได้รับผลลัพธ์ที่แตกต่าง !!!
byte[] sendingPack = new byte[7];
sendingPack[0] = 0x6E;
sendingPack[1] = 0x55;
sendingPack[2] = (byte) 0x0D;
sendingPack[3] = (byte) (1 & 0x000000FF);
sendingPack[4] = 0x01;
sendingPack[5] = 0x0D;
sendingPack[6] = (byte) 0xAA;
getSendBuffer().getOutputStream().write(sendingPack);
sending array : byte[]{0x6E,0x55,0x0D,0x01,0x01,0x0D,0xAA}
receive result array : 6E 55 0D 0A 01 01 0D 0A AA
บนเทอร์มินัล CodeVisionAVR ฉันได้รับ "0A"!! ฉันจะแก้ไขปัญหานี้ได้อย่างไร??
have 0A plussage
. โปรดอธิบายสิ่งที่เกิดขึ้นให้ดีขึ้น คุณปล่อยให้เราแก้ไขมากเกินไป คุณสามารถบอกได้ดีขึ้นมากว่าเกิดอะไรขึ้นและที่ไหน - person greenapps   schedule 17.01.2016