New answers tagged

0 votes

Relay switch when CO value is met

Look at the structure of your if ... else statements (your "decision tree"). Imagine what happens when your CO sensor returns a value of 30 (for example). Your code first evaluates if (co &...
StarCat's user avatar
  • 1,577
0 votes

Relay switch when CO value is met

When co >= cepat_threshold it is also > med_threshold Reverse the tests, starting with the highest value: if (co >= cepat_threshold) { digitalWrite(relay1Pin, LOW); digitalWrite(...
SBF's user avatar
  • 173
1 vote

XH-M131 Photoresistor Relay Module NC position

If you put an additional relay (Relay B) between the XH-M131 and the light and connect the light to the mains via the Normally Closed pole of Relay B, the light will be ON unless Relay B is activated ...
David's user avatar
  • 11

Top 50 recent answers are included