CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Read temp from lm35 and converting it
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
vever001



Joined: 15 May 2010
Posts: 21

View user's profile Send private message

PostPosted: Sun May 16, 2010 6:14 pm     Reply with quote

I have one more question:

I need to switch on a red led if the temperature is over 100°C

I simply did this:

Code:
if(temp1 > 100)         
{
         output_high(PIN_b7);     //switch on the red led
         output_low(PIN_b6);      //switch off the green led
}
if(temp1 < 100)             
{
         output_high(PIN_b6);     //switch on the green led
         output_low(PIN_b7);      //switch off the red led
}


But it don't work...How is it possible??

Thanks Wink
vever001



Joined: 15 May 2010
Posts: 21

View user's profile Send private message

PostPosted: Sun May 16, 2010 8:23 pm     Reply with quote

Arf sorry I forgot to put resistors for these leds...Now it works...

Again...sorry for the inconvenience
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group