Input to output connection

Can there be an option to connect an input to a output? So when a moist sensor is connected and its raining the light of a room goes on for example.
Now is only the option with a button but there is no connection to a output.
Also with measuring of analog signals with two resistors in serie would be a great idea. much more is possible then.

That is very well possible? It can be done fairly easy with an if statement?

1 Like

Or with a bridge widget.

Thx for your quick response!
The an if statement must be placed in the program itself? So when changing something you have recompile the program itself?
Thansk for the help

Thx for your quick response. How does the bridge widget work? When i click on it it comes with the settings screen but there is nothing to change of fill in. What im doing wrong?

What i also see is that a Led onscreen links to a virtual pin. Is there no option to see the Led when an input is high?
Thanks for the help

Let me give you an example in somewhat pseudo-code as we call it (which means it doesn’t actually run, but takes you through the logic):

if(sensorValue >= 10)
{
  digitalWrite(2, HIGH); // Sets output pin 2 to be high (for example to switch a relay attached to pin 2) when sensor is higher then 10
}
else
{
  digitalWrite(2, LOW); // Sets pin to LOW, or off
}

You need some basic programming skills to get this all to work :slight_smile: