Math problem


Results 1 to 6 of 6

Thread: Math problem

Threaded View

  1. #6
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Wink

    Hi, Sayzer

    You' re to it ...

    With showing the Half, now ( was DS 1820 Degrees with 3 Digits Leds...)

    Code:
    		IF ( TEMP > 2631 and Temp < 3731)  	THEN 	' -10 to 100°C
    			
    				Virgule = 1 
    				
    				' round to 1/2 degré et show the 5/10 
    				
    				IF(Tempa // 10) < 3 THEN Tempa = ( Tempa/10)* 10 : GOTO AFF
    			 	
    			 	IF(Tempa // 10) < 8 THEN Tempa = (Tempa/10)*10 + 5 : GOTO AFF
    			 	
    			 	IF(Tempa // 10) > 7 THEN Tempa = (Tempa/10)*10 + 10 : GOTO AFF
    			 			 	
    			ENDIF
    		
    	
    			Virgule = 0
    			
    			IF (Tempa // 10) > 4 THEN 	Tempa = Tempa + 10
    					 						
    			Tempa = Tempa/10 	' Show Degrees without tenths
    Have a nice day

    Alain
    Last edited by Acetronics2; - 16th February 2008 at 10:57.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

Similar Threads

  1. Line Graph, math problem...
    By TerdRatchett in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 6th May 2009, 04:20
  2. Math problem with string result
    By Lotondo in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 15th November 2006, 10:06
  3. PicBasic Pro Math Problem??
    By Glen65 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 5th March 2006, 04:36
  4. Math Formula / Variable Problem! Help!
    By bwarp in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 18th February 2006, 07:59
  5. Math problem...with picbasic pro
    By pcaccia in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 15th October 2005, 19:28

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