【发布时间】:2018-06-13 03:53:24
【问题描述】:
你好,我正在使用 Arduino 和节点 js 我发送和接收数据,但从 arduino 传入的数据是这样的:
<Buffer 00 00 00 e0 e0 e0 00 e0 e0 e0>
<Buffer e0 e0 e0 e0 00 e0 e0 00 e0 00 e0 e0 e0>
如何将其解码为 UTF8
阿杜诺
int incomingByte = 0;
void setup() {
Serial.begin(9600); // opens serial port, sets data rate to 9600 bps
}
void loop() {
if (Serial.available() > 0) {
incomingByte = Serial.read(); // read the incoming byte:
Serial.print(incomingByte);
}
}
【问题讨论】: