Real newbie question - simple garage door sensor - to much info to search <-- poor reasoning ;)

I have searched the forum for this simple question but can’t find the right answer.
I want to make a simple garage door opener with status widget. I can create the button(s) and I can read the status of the magnetic sensors with the buttonLedWidget().
But witch widget can I use just to have an “open” of “closed” label in the app?
I’m testing with an Arduino Uno over usb on android (Samsung J5)
There is so much info and so manny topics, but I can’t find this simple answer…
Thanks

Display Widget.

Start at the shallow end and read some of the Help Documents :wink:

Can you use the display widget just to put “open” or “closed” as status?
Which values do you have to use then in Blynk?

if(DoorStatus == 1){
  Blynk.virtualWrite(Vx, "Open");
}
else{
 Blynk.virtualWrite(Vx, "Closed");
}

Ok getting started here.

For the sensor, do I just initiate this as:

const int DoorStatus = 7; //(as the sensor would be connected in P7?)

No you can’t use the same variable name for the pin and the status.

So I’ll keep my variable and suggest you change yours to DoorPin.

My variable needs defining too but not as a const.

Read DoorPin and set DoorStatus.

You can do it without DoorStatus but it’s probably clearer to throw in the extra variable.