Shop OBEX P1 Docs P2 Docs Learn Events
PING))) Problems — Parallax Forums

PING))) Problems

Scott PortocarreroScott Portocarrero Posts: 72
edited 2009-07-18 05:29 in Accessories
The rawdata coming from the PING has a value of no more that 250 with a home made servo extension cable attached. When I plug the PING directly into the bread board it give me the correct readings up to 5000. The question is why would an extension cable give me such a variance? I tested the resistance on the cable and it measures .2 ohms, is this enough to cause a problem? I suppose there is more resistance after it runs through the breadboard and jumpers also. I don't know confused.gif

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2009-07-13 04:43
    There must be something else different besides the cable when you're running it off the breadboard. I have a home-brew cable that is 4' long for my garage parking assistant and there is no noticable affect on the signal. Besides that it is not an analog signal that would get worse as the cable gets longer. The readings wouldn't change unless they were errartic. If they're fixed at a certain range my guess would be shorted mounting screw or something else.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Engineering
  • Scott PortocarreroScott Portocarrero Posts: 72
    edited 2009-07-18 05:18
    I figured it out! I was using VAR Byte instead of VAR Word. I don't know why this would matter but it does smhair.gif
  • Mike GreenMike Green Posts: 23,101
    edited 2009-07-18 05:29
    A byte can only hold values from 0 to 255. A word can hold values from 0 to 65535. You can't hold raw PING data more than 255 in value in a byte. 256 becomes 0, 257 becomes 1, etc.
Sign In or Register to comment.