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 support@ccsinfo.com

Two Sensor

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
telbozan



Joined: 28 Aug 2007
Posts: 1

View user's profile Send private message

Two Sensor
PostPosted: Tue Aug 28, 2007 3:19 pm     Reply with quote

#if defined s
#define sht11_data PIN_A0
#define sht11_sck PIN_A1
#elif defined !s
#define sht11_data PIN_A2
#define sht11_sck PIN_A3
#endif


How can I use two sensor (SHT11) with same driver ?? I wrote that , But It read only one of them :( Please HELLPPPPPP Rolling Eyes
Not :S int1 variable
SherpaDoug



Joined: 07 Sep 2003
Posts: 1640
Location: Cape Cod Mass USA

View user's profile Send private message

PostPosted: Wed Aug 29, 2007 7:42 am     Reply with quote

I am not sure this is valid

#elif defined !s

I would use S1 and S2 instead of S and !S.
_________________
The search for better is endless. Instead simply find very good and get the job done.
Ken Johnson



Joined: 23 Mar 2006
Posts: 197
Location: Lewisburg, WV

View user's profile Send private message

PostPosted: Wed Aug 29, 2007 9:45 am     Reply with quote

Why not:

#if defined s
#define sht11_data PIN_A0
#define sht11_sck PIN_A1
#else
#define sht11_data PIN_A2
#define sht11_sck PIN_A3
#endif

or

if !defined s
etc . . .

Ken
Guest








PostPosted: Wed Aug 29, 2007 10:11 am     Reply with quote

IT did not work so. How I can write else
SherpaDoug



Joined: 07 Sep 2003
Posts: 1640
Location: Cape Cod Mass USA

View user's profile Send private message

PostPosted: Wed Aug 29, 2007 11:32 am     Reply with quote

Anonymous wrote:
IT did not work so. How I can write else


You will have to tell us HOW it didn't work. Did it compile? What did it do or not do?
_________________
The search for better is endless. Instead simply find very good and get the job done.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
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