Program for DFRobot SEN0386 accelerometer does not work with Arduino UNO
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
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?
Nicolas.GomezI 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?
Nicolas.GomezHello, works properly. I switched Arduino module, probably was something wrong with the one i was using
Nikodem.SlezinskiI tested it, maybe there is a problem with the library. I will give feedback to the R&D department.
Afra