Replies: 1 comment 3 replies
-
After running this script, what do you see on the EV3 menu if you go to devices --> sensors? Also, to which pin (colors) is the analog sensor wired? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there,
I am attempting to get an analog sensor reading using pybricks with a legoEV3 brick and custom ultrasonic sensor and phototransistor light sensors.
I am using this code:
When I log this value I get constant readings of 400 from the ultrasonic sensor and 415 from the light sensors regardless of how I move them around and what they are looking at. I would expect this value to change as they move around. I do know that the sensors are functional as I can run a matlab script with ev3 extension and read raw values from them successfully.
I should note that the way these sensors are set up the ev3 brick is being tricked into thinking that they are touch tensors so using the pybricks "TouchSensor" method I can return "False" values as well. I am unsure if this is affecting how pybricks is reading from them.
If anyone has any ideas I would very much appreciate them.
Thanks,
John
Beta Was this translation helpful? Give feedback.
All reactions