Hserin Array Question


Closed Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2007
    Posts
    59

    Default Hserin Array Question

    I just started to test out using Hserin.

    I first did a test using

    Hserin [dec Data]
    if Data > 1 then
    LED = 1
    else
    LED = 0
    endif

    This was just to make sure everything was communicating and it was. Now on to the real data.
    The data string I want to send is at minimum 23 characters but can be longer (24 for a full 3 bytes) if necessary.
    The data package will look like this:
    “12345678_12_34_87654321”
    I’m using the command
    Hserin [str RxDATA\23]
    ‘RxDATA is defined as
    RxDATA var byte[3]
    Now my problem is how to breakdown the array into
    RxDATA1 = 12345678
    RxDATA2 = 12
    RXDATA3 = 34
    RxDATA4 = 87654321
    I’m guessing I have multiple issues going on here so any guidance is appreciated.
    Thank you,
    Hylan

  2. #2
    Join Date
    Sep 2007
    Posts
    59


    Did you find this post helpful? Yes | No

    Default Re: Hserin Array Question

    Okay, so I think I was over thinking this a bit. I'm able to switch my RxDATA1 & 4 to binary so now I can just use:
    hserin [bin RxDATA1, skip 1, dec RxDATA2, dec RxDATA3, bin RxDATA4]
    This seems to work pretty well

Members who have read this thread : 1

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