Ryan4253

PROS Solenoid + 3 Wire Expander Issue

Oct 24th, 2021 (edited)
670
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Controller master(ControllerId::master);
  2. pros::ADIDigitalOut claw({{19, 'A'}});
  3. Pneumatic claw('D'); // claw ran properly after changing port to D
  4. // pros::ADIDigitalIn limit({{19, 'A'}}); // testing purposes
  5.  
  6. void opcontrol(){
  7.     while(true){
  8.         if(master.getDigital(ControllerDigital::R1)) claw.set_value(true);
  9.         else claw.set_value(false);
  10.  
  11.         // std::printf("claw button: %d", master.getDigital(ControllerDigital::R1)); // printed properly
  12.         // std::printf("limit: %d", limit.get_value()); // printed properly
  13.         pros::delay(10);
  14.     }
  15. }
RAW Paste Data