I have problems with communication between board and sensor. I have almost no experience in programming so I would need some help how to send proper packets to sensor and see response.
I think I wired it correctly. 3.3V to 3.3V, GND to GND, Rx to Tx, and Tx to Rx.
Below is my code, which is not working.
byte byteRead;
uint8_t my_serial_bytes[] = {0x73, 0x6E, 0x70, 0x83, 0x00, 0x01, 0xD4};
void setup() {
Serial.begin(115200);
delay(1000);
Serial.write(my_serial_bytes,sizeof(my_serial_bytes));
}
void loop() {
/* check if data has been sent from the computer: */
if (Serial.available()) {
/* read the most recent byte */
byteRead = Serial.read();
}
}
Where did you get the code that you posted and what are the command bytes in the array intended to do ? If they are intended to issue the commands that you have listed, then where did you get the values from and how will you know if the commands have worked ?
RX and TX on the UNO, pins 0 and 1, are used by the hardware Serial interface so you cannot communicate with the IMU and the Serial monitor at the same time. If you require another serial interface you could use the SoftwareSerial library and define your own RX and TX pins to talk to the IMU,