Shop OBEX P1 Docs P2 Docs Learn Events
how to change the range in the SRF08 ultrasonic? — Parallax Forums

how to change the range in the SRF08 ultrasonic?

eddiecheddiech Posts: 2
edited 2005-11-08 16:23 in General Discussion
hi,

I have a problem with changing the range in SRF08 ultrasonic rangefinder.
Here is my code. I want to reduce the range. Are there any problems in my code?
I use CCS Complier to complie. Thank for any reply.

·· i2c_start();
·· i2c_write(address);
·· i2c_write(0x00);
·· i2c_write(0x51);

·· i2c_start();
·· i2c_write(address);
·· i2c_write(0x01);
·· i2c_write(0x00);

·· i2c_start();
·· i2c_write(address);
·· i2c_write(0x02);
·· i2c_write(0x01);

·· delay_ms(70);

·· i2c_start();
·· i2c_write(address+1);
·· i2c_read(1);
·· rangehigh = i2c_read(1);
·· rangelow· = i2c_read(0);
·· i2c_stop();

Comments

  • allanlane5allanlane5 Posts: 3,815
    edited 2005-11-07 15:13
    Sorry we haven't responded earlier.

    1: I haven't used the SRF08 personally.

    2: Why would you want to reduce the range?

    3: This is a Parallax PBasic forum, not a generic PIC CCS forum. Go ask them.
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-11-07 15:30
    Actually, one can post anything in "the Sandbox" (that's its purpose) but to your point, one might get better service going to CCS or to Daventech (the makers of the SRF-08, a product that Parallax never carried).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-11-07 15:32
    Whoops!· Forgot to mention I move the thread to the sandbox from the Robotics Forum.· =)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • eddiecheddiech Posts: 2
    edited 2005-11-08 16:23
    I'm really sorry! I made a mistake. I thought·the SRF08 is Parallax's production. I feel sorry for my carelessness.
    I had solved my problem.·Thank you!
Sign In or Register to comment.