#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
Not :S int1 variable
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
Posted: Wed Aug 29, 2007 7:42 am
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
Posted: Wed Aug 29, 2007 9:45 am
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
Posted: Wed Aug 29, 2007 10:11 am
IT did not work so. How I can write else
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
Posted: Wed Aug 29, 2007 11:32 am
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.
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