GP2Y0A710K0F sensor problem

I am wondering the pinout for this sensor. there's the website I bought it from. I tried following its pinout, but I only got 15 as the serial port result.

void setup() {


void loop() {


Any help appreciated, squidsirymchenry


or u could also use


if u do not need to use the readings later

tzijie: if u do not need to use the readings later

What do you mean?

You’ll have to excuse @tzijie; s/he hasn’t got the hang of personal pronouns or the shift key

Or you could also use


If you do not need to use the readings later

@ spycatcher2k that didn't work I will try the other one @tzijie It worked!! Thank you

@ spycatcher2k that didn't work

You didn't try hard enough.

"That didn't work" is lame

@AWOL well technically I did, but the second program showed the results better, but now, I'm trying to stop my program with a button and restart it when it is pressed.