Results 1 to 3 of 3

Thread: MaxSonar Ez1

  1. MaxSonar Ez1

    I'm working with the Maxsonar ez1 and i don't understand the data
    received.
    this is an example of this data:

    Data received: 043 000 159 208 086 086 000 043 000 159 208 086 086 000

    the program (for debug) i use for capture the output (in decimal
    format captured from TX) is 232-Analyzer (from Pc).
    I don't know if the data are correct,because the MaxSonar's datasheet
    reveal many differences
    (e.g. the first character must be "R",but i read 043 that is "+" in
    ASCII code!!!).

    This is example code:

    Static Buffer As String
    Dim Reading As String
    Dim RPos As Integer
    Dim CRPos As Integer
    Buffer = Buffer & MSComm1.Input
    RPos = InStr(Buffer, "R")
    If RPos > 0 Then
    CRPos = InStr(RPos, Buffer, vbCr)
    If CRPos > 0 Then
    Reading = Mid$(Buffer, RPos + 1, CRPos - 1 - RPos)
    Buffer = Mid$(Buffer, CRPos + 1)
    Debug.Print Reading
    CWGraph1.Chart
    CWGraph1.ChartY (Reading + Calibration) *
    DistanceMultiplier,
    0.05
    End If
    End If
    End Sub

    The Calibration is 1and DistanceMultiplier is 2.54

    please help me!!!
    Thanx!

  2. Re: MaxSonar Ez1

    have I need to invert the signal sent by the maxsonar
    with a TTL to RS232 converter?

  3. Re: MaxSonar Ez1

    Do you have the EZ-1 connected directly to the computer? If so, you'll need to use an RS232 driver, such as the MAX232 IC. Also, you may have to invert the signal before sending it to the RS232 driver.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 29
    Last Post: 03-06-2007, 10:48 AM

Posting Permissions

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