|
楼主 |
发表于 2019-6-17 09:40
|
显示全部楼层
本帖最后由 ecnuzyh 于 2019-6-17 13:36 编辑
#include <SoftwareSerial.h>
SoftwareSerial mySerial(13,15);
signed char IM1253B[8] = {0x01,0x03,0x00,0x48,0x00,0x08,0xC4,0x1A};
void setup() {
Serial.begin(9600);
mySerial.begin(9600);
for(int i=0 ; i<8 ; i++){
mySerial.write(IM1253B);
}
}
void loop(){
if (mySerial.available()) {
Serial.println("1");
Serial.println(mySerial.read());
}
}
|
|