How to read status of the pin

Hello,
I wrote a program which at one point look at IO35.
It is an ESP32
If IO35 is 1 (3 volts) the program flash a led forever.
If IO35 is 0 (0 volts) the program flash the led 40 seconds and stop.
I declared the IO35 in the H file as input
"#define VUSB 35 //Power when conected to USB"
In the setup section it is declared also as input

Blockquote

void setup() {
//Setup the IO pins
pinMode(KH1, OUTPUT);
pinMode(KH2, OUTPUT);
pinMode(KH3, OUTPUT);
pinMode(KH4, OUTPUT);

pinMode(RFID_TX, INPUT);
pinMode(KV1, INPUT);
pinMode(KV2, INPUT);
pinMode(KV3, INPUT);

pinMode(VUSB, INPUT);

Blockquote

And the code is here

Blockquote

if (VUSB == 0)
{
if (((long)millis() - PowerTimer) > 40000)
{
Serial.println("Shutting down...");
digitalWrite(POWERON, 0); //After 40 sec of no activity shut down the power
digitalWrite(RED_LED, 0); digitalWrite(GRN_LED, 0); digitalWrite(BLU_LED, 0);
Serial.end();
//while (1) {}; //Wait 6 sec for hardware Watchdog
}
}

Blockquote

I need some help please

Doesn't seem likely, does it?

Please remember to use code tags when posting code

I am sorry, but I do not understand.
this declaration
`Preformatted text``

#define VUSB 35Preformatted text is on the H file with others. and this line ``if (VUSB == 0)
type or paste code here

it is on the  loop section.
Bottom line, what is the correct form to read the status of the line?
It is high or it is low.
Can you post a sample code ?
Thank you
I do not know how to use the code posting here 
Can you help?

Do you want to see if VUSB is equal to '0' or if digitalRead(VUSB) is '0'?

I want to have an action is they are ZERO volts on IO35, and ignore the IF statement is on IO35 the voltage is 3 volts.

So, you want digitalRead.

Thank you

What is the diference between VUSB is equal to '0' and digitalRead(VUSB) is '0' ?

You gave VUSB the value 35.
How often is it ever going to equal 0 or 1?

I declared VUSB as pin for IO35, not value 35.
My program has different files.
One of them has the same name as the program name, but the termination is.h, like a header file.
Inside I have all the name and the corresponding IO number like here
...
#ifndef _RF_SOLUTIONS_K
#define _RF_SOLUTIONS_K

#include <esp_now.h>
#include <WiFi.h>
#include <esp_wifi.h>
#include <EEPROM.h>
#include <AES.h>
#include <AESLib.h>
#include <AES_config.h>
#include <base64.h>
#include <SoftwareSerial.h>
#include
#include <esp_task_wdt.h>
#include "MAC_Addresses.h"

#define CHANNEL 1
#define PRINTSCANRESULTS 1
#define DELETEBEFOREPAIR 0

//OUTPUTS
#define KH1 26 //HUZZAH: pin A0
#define KH2 19
#define KH3 18
#define KH4 23
#define RED_LED 21
#define GRN_LED 22
#define BLU_LED 17 //5
#define POWERON 4
#define RFIDON 5

//INPUTS
#define RFID_TX 25 //HUZZAH: pin A1
#define KV1 32 //new on HUZZAH, was 35 on ESP32
#define KV2 33
#define KV3 34 //HUZZAH: pin A2

#define VUSB 35 //Power when connected to USB

#define WDT_TIMEOUT 3
...
On the program, on the setup section I declared the IO35 as Input
pinMode(VUSB, INPUT);
Then in the loop, I look at it all the time.
From USB port, I have a divider of 3 volts connected at the port.
If I have USB connected, the voltage at the port is 3 volts, and with no USB, the voltage is 0 volts.
This is the whole configuration.

You defined it as 35.
It's a simple text substitution.
You see

if (VUSB == 0)

The compiler sees

if (35 == 0)

Please remember to use code tags when posting code.

Then, how I should declare IO35 as input pin for VUSB ?
How to use code tags.
When I click, it is marked as preformatted text.

You see

pinMode(VUSB, INPUT);

What do you think the compiler sees?

pinMode(VUSB, INPUT);

I declared on the setup section of the program.
On the header file, I declared.

#define VUSB 35

For me, it means that VUSB is connected to IO35.
I never assigned the value 35 to VUSB

For me it means, "in the source code, every time the string "VUSB" appears, replace it with the string "35""

Nothing more, nothing less.

Thank you