Pages: [1]   Go Down
Author Topic: Switching code when in specific condition  (Read 239 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello there!

I would like to do the following:

1) Default setting: sensor1<200=led,LOW || sensor2<200=led,LOW

2) if(sensor1<200 && sensor2<200)= led = LOW

3) if condition 2) changes to: sensor1>200 && sensor2<300 || sensor1<200 && sensor2>300 =led,HIGH

4) from condition 3) to default

How can I do this?

Thanks in advance!
Logged

Poole, Dorset, UK
Offline Offline
Edison Member
*
Karma: 52
Posts: 2381
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

In loop(), hint loop is called repeatedly.

Mark
Logged

California
Offline Offline
Faraday Member
**
Karma: 92
Posts: 3442
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

How many posts are you going to make of the same issue, in different areas of the forum, with different titles and descriptions?
Logged

Pages: [1]   Go Up
Jump to: