PROS Potentiometer Initialization

  1. 2 weeks ago

    mlarson

    Jan 4 3018v
    Edited 2 weeks ago by mlarson

    I am using PROS to program my robot and I am trying to use a potentiometer for our autonomous selector because our global variables were not working. I am having trouble initializing the potentiometer. When I go and try to initialize it, I am met with an error that says, "no matching constructor for initialization of 'pros::ADIPotentiometer' (aka 'pros::ADIAnalogIn')" I will leave my code below, any and all help would be greatly appreciated. I haved looked at the PROS API for initializing the potentiometer and did as it instructed but that did not help.

    #define POTENTIOMETER_PORT 1
    
    pros::ADIPotentiometer sensor(POTENTIOMETER_PORT);
  2. last week

    hotel

    Jan 5 V5 Beta Moderator HTTP 404 PROS Dev Team Lead

    Does this error show up when you attempt to build the project? Or just in the editor?

  3. mlarson

    Jan 7 3018v

    Nevermind, I was able to fix the problem.

 

or Sign Up to reply!