TroubleshootingArduino

Program for DFRobot SEN0386 accelerometer does not work with Arduino UNO

userHead Nikodem.Slezinski 2023-08-24 06:00:38 893 Views4 Replies

Hello. I have sensor DFRobot SEN0386. I connected RX to TX and TX to RX on Arduino UNO (1 and 0 ports), also 5v and gnd connected.

The program is:

#include <DFRobot_WT61PC.h>

DFRobot_WT61PC sensor(&Serial); // Use the hardware serial port on Arduino Uno

void setup()
{
 Serial.begin(115200);
 sensor.modifyFrequency(FREQUENCY_10HZ);
}

void loop()
{
 if (sensor.available()) {
   Serial.print("Acc\t"); Serial.print(sensor.Acc.X); Serial.print("\t");
   Serial.print(sensor.Acc.Y); Serial.print("\t"); Serial.println(sensor.Acc.Z); //acceleration information of X,Y,Z
   Serial.print("Gyro\t"); Serial.print(sensor.Gyro.X); Serial.print("\t");
   Serial.print(sensor.Gyro.Y); Serial.print("\t"); Serial.println(sensor.Gyro.Z); //angular velocity information of X,Y,Z
   Serial.print("Angle\t"); Serial.print(sensor.Angle.X); Serial.print("\t");
   Serial.print(sensor.Angle.Y); Serial.print("\t"); Serial.println(sensor.Angle.Z); //angle information of X, Y, Z
   Serial.println();
 }
}


I don't know what is going on, but I do not see anything on serial monitor.
Do any of you know what may be the problem? Sketch uploads without problems but no data received from sensor

2024-12-17 05:35:48

Hello, I'm having the same issue. I have tested multiple boards and made sure that the wiring is connected properly. I am running the same code shown above for my Arduino R4 Wi-Fi board. Are there any suggestions as to what to try next?

userHeadPic Nicolas.Gomez
2024-12-06 01:33:23

I am having the exact same issue, but I tried two different arduino R4 wifi boards with the same code and while they compile and verify nothing shows up on the Serial Monitor. What are other things I can do?

userHeadPic Nicolas.Gomez
2023-08-25 03:48:59

Hello, works properly. I switched Arduino module, probably was something wrong with the one i was using

userHeadPic Nikodem.Slezinski
2023-08-24 21:36:10

I tested it, maybe there is a problem with the library. I will give feedback to the R&D department.

userHeadPic Afra