+ Reply to Thread
Results 1 to 2 of 2

Thread: test

  1. #1
    Join Date
    Jan 2010
    Posts
    5

    Default test

    here is my code

    Code:
    mainloop:
    
    for index = 1 to 3 step 1                                   ; read 10 values for 3 sensors
     
        For index2 = 1 to 10  step 1                            ; Take 10 reading
              
            if temp_val[index2] < temp_val_lo[index] then       ; is readling lower than lowest
                temp_val_lo[index] = temp_val[index2]           ; update lowest
                temp1[index] = temp1[index] + temp_val[index2]  ; add reading to running total                             
            else if temp_val[index2] > temp_val_hi[index] then  ; is reading higher than highest
                temp_val_hi[index] = temp_val[index2]           ; update highest
                temp1[index] = temp1[index] + temp_val[index2]  ; add reading to running total
            else                                                ; if reading not highest or lowest 
                temp1[index] = temp1[index] + temp_val[index2]  ; add reading to running total   
        
        next index2                                             ; update next reading
                
    next index                                                  ; update next sensor
    
    goto mainloop

  2. #2
    Join Date
    Feb 2012
    Location
    South Carolina, USA
    Posts
    14

    Default Re: test

    testdfdfasdfa


    Hi, we are pleased to see that you are using our forum.

    We'd like you to become a member of our community. Membership is FREE, please REGISTER and view our forums without these annoying reminders!

    Once registered you may post on the forums, download from the file areas and use the WIKI without interruption.





Members who have read this thread : 0

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

Posting Permissions

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