I am using a WitMotion WT901C-TTL inclinometer to provide angle data to an Arduino Mega2560. I can already receive data through the mega's RX1 pin. Now I am trying to send a calibration command to the sensor from the mega's TX1 pin, but the sensor doesn't go into calibration mode or respond in any way.
I have the sensor's TX pin connected to the mega's RX1 pin, and the sensor's RX pin connected to the mega's TX1 pin.
According to the datasheet and FAQ, the sensor needs the following commands to calibrate:
Unlock: FF AA 69 88 B5
Save: FF AA 00 00 00
Enable calibration: FF AA 01 01 00
wait 3 seconds
Disable calibration: FF AA 01 00 00
Save: FF AA 00 00 00
This is the arduino code I am using:
Serial1.begin(9600); // Use the RX1 and TX1 pins on the Mega2560
// Unlock configurations
byte data1[] = {0xFF, 0xAA, 0x69, 0x88, 0xB5};
Serial1.write(data1, 5);
// Enable Calibration mode
byte data2[] = {0xFF, 0xAA, 0x01, 0x01, 0x00};
Serial1.write(data2, 5);
delay(3000);
// Disable calibration mode
byte data3[] = {0xFF, 0xAA, 0x01, 0x00, 0x00};
Serial1.write(data3, 5);
// Save the configuration
byte data4[] = {0xFF, 0xAA, 0x00, 0x00, 0x00};
Serial1.write(data4, 5);
The serial1 is the same interface being used to read data from the sensor, so I imagine it would work sending data to the sensor too. But the sensor does not respond in any way to these commands.
WitMotion customer service was pretty unhelpful. I'm hoping someone here has some real experience with the device.