Hey there,
I've been working on a project that involves an ePIR motion sensor (SEN-09587) that supports a serial communication mode. This sensor has all kinds of configurable properties through the serial communication mode, so I figured the best way to calibrate it would be to create a debug environment using the serial monitor and send commands to it that way.
I connected the ePIR TX and RX pins to the respective RX and TX pins on the Arduino and began testing. I quickly found out that this method was not going to work. As an example, you can read the state of motion detection by sending the character command 'a' (0x61). The ePIR will then respond with a Y or an N to indicate whether it had detected motion or not. This works all fine and good in code, but not through the serial monitor.
What I was trying to do was send commands to the ePIR through the serial monitor instead of hard coding the messages in code to make for quick adjustments, as you can program sensitivity through the commands. When I tried sending 'a' through the serial monitor, I would get no response from the ePIR. This seemed to be because that the arduino was receiving the message instead (as indicated by a flashing RX light upon pressing send) but was not forwarding it on to the ePIR. If I coded Serial.write('a'); instead, I would see the response I was looking for, but the write command automatically prints to the serial monitor. So, I would get output that looked like aN or aY, combining the original write command and the response.
What would be really nice is if there was some kind of passive serial mode for the Arduino serial monitor that would not cause the messages to stop at the Arduino but would continue to be sent through the TX and RX pins instead. In addition, it would be cool if the Serial.write() command did not automatically print the input to the serial monitor unless it was read from the serial buffer and printed as such. This way you could employ methods to avoid the echo effect of sending a command and seeing it on the serial monitor output.
I pulled my hair out for a few hours trying to figure out what I was doing wrong, but after tearing things apart, I finally figured that it may not have been a result of my doing but a software limitation. Can anyone second me on this? I will admit, I am pretty new to serial communications on the Arduino, so if I missed something or if there is a way around this, please feel free to share.
TL;DR: It would be really awesome if I could interface the ePIR indirectly through the Arduino by using the serial monitor. Also, it would be cool to disable the echo in the serial monitor caused by Serial.write() commands.
Thanks in advance!