We are using a Armabot turret 240 with the AS5600 encoder. We are trying to read the position, but when we use the code on the website, https://cdn.shopify.com/s/files/1/1518/8108/files/Armabot_A0085_Turret240_Encoder_Board_RevB.PDF with .getPulseWidthRiseToFallUs(); it doesn’t seem to be giving us values that make sense. We’ve also tried getPulseWidthRiseToFallUs() which at times seem to be giving us consistent values, but other times don’t.
Here is the code we are using just to try to print the position, move the turret for half a second and then print the position again:
System.out.println("Turret Rotator PWM at start: " + turretRotator.getSensorCollection().getPulseWidthPosition());
turretRotator.set(ControlMode.PercentOutput,.35);
Timer.delay(.5);
turretRotator.set(ControlMode.PercentOutput,0);
System.out.println("Turret Rotator PWM at end: " + turretRotator.getSensorCollection().getPulseWidthPosition());
Any help is appreciated. Thanks!
