Hi, I have an AM1008W sensor and an Arduino MEGA2560, this sensor has different orders that can be executed, the problem comes when I send the measurement order, which would be 11 02 01 01 EB if it responds, I add an image:
But when I serial another command like this 11 01 1F CF doesn't respond, I appreciate any help you can give me.
And I attach the code with both orders
byte Word [] = {0x11, 0x02, 0x01, 0x01, 0xEB}; //11 02 01 01 EB
//byte Word [] = {0x11, 0x01, 0x1F, 0xCF,}; //11 01 1F CF
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
Serial1.begin(9600);
Serial1.write(Word, sizeof(Word));
Serial.println("Waiting");
}
void loop() {
while (Serial1.available() > 0) {
byte inByte = (Serial1.read());
Serial.print("Data: ");
Serial.println(inByte);
delay(10);
}
}