Serial Passive Mode
In this mode, actually, as long as you wire the module TX & RX with the MCU, just as we did in the
[
test on software
],you are using this mode.By serial, you have all authority to access to the sensor
such as: ultrasonic distance measurement, temperature measurement, the distance changes,
automatic measurement intervals set, serial port set(RS232 or TTL, reboot to take effect).
e.g.
1. Read the temperature data command
:
0x11 0x00 0x00 0x11
2. Read the distance data command
:
0x22 0x00 0x00 0x22
3. Read EEPROM data command
:
0x33 0x00 0x00 0x33
4. Write EEPROM data command
:
0x44 0x02 0x00 0x46
Download the code below to your uno board(if you use the leonardo,please modify the code for the
serial problem, help on arduino.cc ), then wire the TX/RX,5V,GND.Follow [
test on software
].Here,we
use the sensor to read the tempreture.
Demo Code