Parallax Ping Issue


Closed Thread
Results 1 to 3 of 3

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: Parallax Ping Issue

    Try something like this
    Code:
        INCONSTANT  CON 890
        INDISTANCE  VAR WORD
        TIME        VAR WORD
        
        START:
        HIGH PORTB.3
        PULSOUT PORTB.3,2
        PULSIN  PORTB.3,1,TIME
        INDISTANCE = INCONSTANT ** TIME
        LCDOUT $FE,1,DEC3 INDISTANCE," INCHES" 
        PAUSE 100
        GOTO START
    Dave
    Always wear safety glasses while programming.

  2. #2
    Join Date
    Nov 2012
    Posts
    2


    Did you find this post helpful? Yes | No

    Default Re: Parallax Ping Issue

    Thank you so much. It works!!! (although I have no idea why)

    Johnny k.


    Quote Originally Posted by mackrackit View Post
    Try something like this
    Code:
        INCONSTANT  CON 890
        INDISTANCE  VAR WORD
        TIME        VAR WORD
        
        START:
        HIGH PORTB.3
        PULSOUT PORTB.3,2
        PULSIN  PORTB.3,1,TIME
        INDISTANCE = INCONSTANT ** TIME
        LCDOUT $FE,1,DEC3 INDISTANCE," INCHES" 
        PAUSE 100
        GOTO START

Similar Threads

  1. Humidity problem with ping sensor
    By celequanta in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 27th July 2012, 03:06
  2. Generating ping sounds
    By bodgetts in forum General
    Replies: 9
    Last Post: - 23rd January 2012, 07:14
  3. Parallax GPS Receiver
    By emavil in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 11th February 2009, 09:35
  4. Code Issue - select case or 'if' issue - not sure why
    By jamie_s in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 7th October 2007, 08:52
  5. Ping Darrel Taylor - Timer0 Instant Interrupt
    By JEC in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 9th January 2007, 11:20

Members who have read this thread : 0

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts