Hello, welcome to our forum.

It looks like you have registered but you have not yet posted and messages. Our requirements are that you must post at least two messages, to allow the moderators to review your registration, before you will be allowed access to the full range of forum areas.

Please make a couple of posts, until then you may see a notice that says you are banned from certain forum areas.


Thank you.

Remove Text Formatting
Loading...

+ 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
    18

    Default Re: test

    testdfdfasdfa

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