Volume sensor error

While I was testing my Volume Sensor, the value would occasionally freeze up. It wouldn’t change ever. It wouldn’t go back to normal until I turned off the bot. This has happened multiple times. Do you know why this is happening, and how can I prevent it from happening during competitions?

The correct name is potentiometer. I’ve always found them to be reliable UP UNTIL someone makes it go 360 degrees. The normal range is 280 degree turn. Once you spin them across the solder connections in the middle they become useless. https://qph.fs.quoracdn.net/main-qimg-e41a6d46e6033c64b92226aa3f382820

No, not the potentiometer, the sonar.

Leon, what debugging steps have you tried?

Does this problem occur with just the specific sonar sensor you are using?

Have you tried a code that ONLY takes sonar measurements in order to ensure that it’s not a coding error?

Can you link your code?

I’m not aware of any debugging steps.

I’d assume so, but it’s the only one I have, so I wouldn’t know.

I’m not using a code, I’ve only plugged it into the cortex, and plugged the cortex into the computer, so I view the sensor data tab in RobotC.

try using a different port on the cortex, you also might have in and out the wrong way round

Debugging steps is just anything you’ve tried to pinpoint the error.

I’d do what 224x suggested, both with the cortex you’re currently using, as well as a different cortex. If neither helps you, then its likely something is broken with the sensor (whatever it is).

Worth trying as well: attach a different sensor (ie. quadrature, potentiometer etc.) to the same port and observe the behavior.

I’ll do those, thank you.

Alright! Good luck!

Anytime :slight_smile:

This article I wrote can probably help you out
https://renegaderobotics.org/vex-sensors-ultrasonic-range-finder/

Specifically, the wire labeled ‘input’ has to be in the lower-numbered digital port, and the ‘output ‘ wire in the adjacent higher-numbered digital port.

nice!