I’m trying this real simple code I cut and pasted from various “sticky” on this section of the forum. I connected my ping))) sensor on the AX1 pin, with the 5V jumper that powers the AX0-AX3’s center pins. Here is the code I’m trying:
;ABB Pin Label<-> ATOM PRO Pin name
;AX0 <-> P19
;AX1 <-> P18
;AX2 <-> P16
;AX3 <-> P17
pingvalue var word
pingport con P18
getping
low pingport
high pingport
pulsin pingport, 0, pingvalue
low pingport
pingvalue = pingvalue / 2
serout s_out,i9600,[DEC pingValue]
pause 1000
goto getping
All I get is a succession of zeros in my terminal 1 (that i’m using for debug messages with the serout s_out command)
Thanks kurte, I’ll give that a whirl when I get home… I’m actually the same as you with the Ping sensor, I ordered it sometime after the new years, and haven’t really hooked it up yet. Just wanted to try to see if it was alive lately cause I needed a break from doing IK and vector/positional transformation programming for my hex.
I did check out my GP2D12 though. It is functional, but due to the voltage divider circuit that Jim mentioned in another thread, the ranging is cut down in half.
Just getting my sensors ready when my hexy starts walking…
Well, I had a few free minutes so I plugged mine in to an ABB board (p5) and cut and paste the code in from my previous post and I got all zeros. So I moved it to P0 and tried it again and then I started getting valid input. So remembering on the “Old” ABB boards we have the switches and LEDS on P4-P6. So I moved it back to P5 and removed the jumpers and I started to get valid input.
I hope this helps
Kurt
P.S. - I will interested to see your IK code when it is working…