RobotPy and analog sensors

I am trying to port the ‘gearsbot’ demo to RobotPy including full physics support for all subsystems.

… not just the drivetrain that is already included in the examples

The first major hurdle is the elevator subsystem that uses a linear potentiometer for feedback. Now I am not yet at the PID side of things. Just trying to get the physics.py to understand and link the movement of the motor to an analog value representing the elevator height.

I have a basic motor movement translated to height/voltage calculation, but when I try to set the value/voltage (I have tried both) on the analog input, nothing happens. No values get shown in the simulation gui and nothing shows up coming into shuffleboard from the sensor.

Does anyone have an example of RobotPy physics.py that connects to an analog input? Note that while the analog gyro is an analog input, it is actually a special case in the code and different that a standard analog input.

Thank You

Let’s follow the path:

Thank You.

I now have the shuffleboard reading the value (needed to use voltage instead of value, which I swear I tried too). I need to re-calibrate my functions that mimic the mechanical connections in the physics script, but moving forward. I still wish the simulation dashboard analog_in values would track these changes.

A couple of really minor things in the development flow. I am working on them myself.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.