Quote:
Originally Posted by jajabinx124
Post some code?
You can find the actual range limit and the width of the ultrasonic soundwaves when you look at the data sheet for the sensor.
|
The code is as simple as it comes:
Code:
#in init code
ultrasonic = wpilib.analog.input(3)
#in teleop
print(ultrasonic.getValue())
I see on the datasheet that it is supposed to be able to output 0 to 1023 for analog, but since I get nothing close to that, does that mean my sensor has gone bad or something? Thanks!