Hello, I’m controlling a three phasic motor using a DRV10983 controller (Just the chip, not the evaluation board). I want to control it by serial communication with Labview while I am reading to the gyro and others sensors.
My Problems is that I loose Serial communication when I call wire.h
If the next lines are comment there is no problem in the code:
//Get the gyro data
Wire.requestFrom(MPU,6,true); // read 6 continuos registers
(reading the gyro alone works perfectly is just a matter of doing it while I try to control the PWM of the motor controller)
The PWM of the DRV controllers works form 1kHz so I set my timer 2 to 3.9kHz by
TCCR2B = TCCR2B & B11111000 | B00000010;
But even changing to the other timers pins 9 and 6 I lost serial communication if want to read from the sensors.
Also, the code works if I don’t try to write to the PWM:
What actually it does and spins the motor, just that I loose serial communication and cannot control it anymore
Anyone who had faces something similar…