Help with Maxim Ibutton "IF THEN ELSE" statements please


Closed Thread
Results 1 to 39 of 39

Hybrid View

  1. #1
    Join Date
    Jun 2009
    Location
    Sc*nthorpe, UK
    Posts
    333


    Did you find this post helpful? Yes | No

    Default Re: Help with Maxim Ibutton "IF THEN ELSE" statements please

    You could set up a retry loop.

    mainloop:
    High led
    pause 250
    low led
    pause 250

    for I=1 to 5 'or anything you like
    Owout ibutton,1,[$33],mainloop
    pause 100
    owin ibutton,0,[Serial[0],Serial[1],Serial[2],Serial[3],Serial[4],Serial[5],Serial[6],Serial[7]]
    If Serial[1]=$15 and Serial[2]=$D3 and Serial[3]=$7D AND Serial[4]=$16 AND Serial[5]=$00 AND Serial[6]=$00 then correct1
    If Serial[1]=$68 and Serial[2]=$36 and Serial[3]=$4F AND Serial[4]=$17 AND Serial[5]=$00 AND Serial[6]=$00 then correct2
    If Serial[1]=$1E and Serial[2]=$1A and Serial[3]=$2C AND Serial[4]=$17 AND Serial[5]=$00 AND Serial[6]=$00 then correct3
    Next i
    'If Serial[1]=$F0 and Serial[2]=$66 and Serial[3]=$2C AND Serial[4]=$17 AND Serial[5]=$00 AND Serial[6]=$00 then nocache
    gosub wrong
    Goto mainloop

    change the value of I to test for optimum performance.

  2. #2
    Join Date
    May 2012
    Location
    Merseyside, UK
    Posts
    237


    Did you find this post helpful? Yes | No

    Default Re: Help with Maxim Ibutton "IF THEN ELSE" statements please

    Steve

    The retry loop seems to have cured the missreading.... If it dont get it the first time it tries 3 more times... I=3
    I have also put :- If (Serial[1]=$F0) etc in brackets... Tides things up a bit.:-)

    It seems to be working OK now

    Thank you again for help....Maybe see you in Scunny on Monday ...!!!

    THank you all others who helped..... Great Forum!!

  3. #3
    Join Date
    Jun 2009
    Location
    Sc*nthorpe, UK
    Posts
    333


    Did you find this post helpful? Yes | No

    Default Re: Help with Maxim Ibutton "IF THEN ELSE" statements please

    Andy

    You are welcome. If you need any more help just ask.

    Cheers

Similar Threads

  1. Replies: 0
    Last Post: - 14th November 2013, 04:32
  2. Replies: 3
    Last Post: - 15th October 2012, 09:06
  3. Replies: 8
    Last Post: - 3rd March 2011, 23:20
  4. Replies: 5
    Last Post: - 28th February 2011, 16:33
  5. Replies: 1
    Last Post: - 16th February 2005, 21:05

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