|
Re: printf to display pwm outputs?
Assuming that you are using Servo objects to control the camera motors, you can't get the voltage going to the servos on the camera. Servos don't take analog input to move (in a sense). Instead, they take PWM to turn to a specific angle depending on the pulsewidth of the signal sent. So finding the voltage being sent won't really help you. You can use this code though to get the angle being sent to the servo:
printf("1: %f , 2: %f \n", servo1->GetAngle(), servo2->GetAngle());
Make sure you have the setup required to get debug output from the cRio. This means making a physical connection to the cRio via serial cable and making sure the little "debug" switch on the cRio is in the on position.
|