Hi everyone,
I made a code to use a mpu6050 accelerometer :
#include <MPU6050_tockn.h>
#include <Wire.h>
MPU6050 mpu6050(Wire);
void setup() {
Serial.begin(9600);
Wire.begin();
mpu6050.begin();
mpu6050.calcGyroOffsets(true);
}
void loop() {
mpu6050.update();
Serial.print(mpu6050.getAccY()*9.81);
Serial.print(",");
if ((millis() / 1000) % 2 == 0) {
Serial.print(1);
}
else {
Serial.print(0);
}
Serial.print(",");
}
At first everything was working fine, I could visualize data from both the serial monitor and plotter but in the last couple of days the plotter stopped showing the data after a few seconds even though I didn't change anything in the code and I can still see my data coming from the sensor on the monitor. Does anyone know how I could fix this?
Here are the details of what I have:
Board: Arduino Nano
Processor: ATmega328P (Old Bootloader)
Programmer: Arduino as ISP
Thanks!
Note: I did try to change (in the IDE) the processor and the programmer but it didn't change the results