Shop OBEX P1 Docs P2 Docs Learn Events
Reading Eddie Sonar Data in VPL — Parallax Forums

Reading Eddie Sonar Data in VPL

T3rr0rByte13T3rr0rByte13 Posts: 29
edited 2013-11-30 22:27 in Robotics
I am trying to read the sonar data from the Eddie. What I think should happen is that I should get a constantly updating value in integer format, which I can then use to say "If left sonar sensor < 30 then turn right" However I am having troubles finding how to get this number. I know that the Mark robot service exposes this sonar sensor, but how do I get the current value of the sensors?

Comments

  • T3rr0rByte13T3rr0rByte13 Posts: 29
    edited 2013-11-30 22:27
    I figured it out. I Just needed to use the Get (Analog - Digitial pin array) and then a simple if statement with Pins[1].PinValue gave me the number I was looking for.
Sign In or Register to comment.