Skip to main content

I think this method inefficentinefficient. Because ESP32 continuously listens to the button state.

You willcan try this method . Working for me .

int R1 = 2;
NexDSButton bt0 = NexDSButton(0, 8, "bt0");
uint32_t dual_state=0;

void setup(){
nexInit();
pinMode(R1, OUTPUT);
}
void loop(){
bt0.getValue(&dual_state);

if(dual_state==1) //When pressed dual state button dual_state =1
  {
    digitalWrite(R1, HIGH);
  }
  else if(dual_state==0)
  {
    digitalWrite(R1,LOW ); 
  }

}
    int R1 = 2;
    NexDSButton bt0 = NexDSButton(0, 8, "bt0");
    uint32_t dual_state=0;
    
    void setup(){
    nexInit();
    pinMode(R1, OUTPUT);
    }
    void loop(){
    bt0.getValue(&dual_state);
    
    if(dual_state==1) //When pressed dual state button dual_state =1
      {
        digitalWrite(R1, HIGH);
      }
      else if(dual_state==0)
      {
        digitalWrite(R1,LOW ); 
      }
    
    }

I think this method inefficent. Because ESP32 continuously listens to the button state.

You will try this method . Working for me .

int R1 = 2;
NexDSButton bt0 = NexDSButton(0, 8, "bt0");
uint32_t dual_state=0;

void setup(){
nexInit();
pinMode(R1, OUTPUT);
}
void loop(){
bt0.getValue(&dual_state);

if(dual_state==1) //When pressed dual state button dual_state =1
  {
    digitalWrite(R1, HIGH);
  }
  else if(dual_state==0)
  {
    digitalWrite(R1,LOW ); 
  }

}

I think this method inefficient. Because ESP32 continuously listens to the button state.

You can try this method . Working for me .

    int R1 = 2;
    NexDSButton bt0 = NexDSButton(0, 8, "bt0");
    uint32_t dual_state=0;
    
    void setup(){
    nexInit();
    pinMode(R1, OUTPUT);
    }
    void loop(){
    bt0.getValue(&dual_state);
    
    if(dual_state==1) //When pressed dual state button dual_state =1
      {
        digitalWrite(R1, HIGH);
      }
      else if(dual_state==0)
      {
        digitalWrite(R1,LOW ); 
      }
    
    }
deleted 17 characters in body
Source Link

I think this method inefficent. Because ESP32 continuously listens to the button state.

You will try this method . Working for me .

int R1 = 2;
NexDSButton bt0 = NexDSButton(0, 8, "bt0");
uint32_t dual_state=0;

void setup(){
nexInit();
pinMode(R1, OUTPUT);
}
void loop(){
bt0.getValue(&dual_state);
delay(200);

if(dual_state==1) //When pressed dual state button dual_state =1
  {
    digitalWrite(R1, HIGH);
  }
  else if(dual_state==0)
  {
    digitalWrite(R1,LOW ); 
  }

}

I think this method inefficent. Because ESP32 continuously listens to the button state.

You will try this method . Working for me .

int R1 = 2;
NexDSButton bt0 = NexDSButton(0, 8, "bt0");
uint32_t dual_state=0;

void setup(){
nexInit();
pinMode(R1, OUTPUT);
}
void loop(){
bt0.getValue(&dual_state);
delay(200);

if(dual_state==1) //When pressed dual state button dual_state =1
  {
    digitalWrite(R1, HIGH);
  }
  else if(dual_state==0)
  {
    digitalWrite(R1,LOW ); 
  }

}

I think this method inefficent. Because ESP32 continuously listens to the button state.

You will try this method . Working for me .

int R1 = 2;
NexDSButton bt0 = NexDSButton(0, 8, "bt0");
uint32_t dual_state=0;

void setup(){
nexInit();
pinMode(R1, OUTPUT);
}
void loop(){
bt0.getValue(&dual_state);

if(dual_state==1) //When pressed dual state button dual_state =1
  {
    digitalWrite(R1, HIGH);
  }
  else if(dual_state==0)
  {
    digitalWrite(R1,LOW ); 
  }

}
deleted 3 characters in body
Source Link

I think this method not sufficentinefficent. Because ESP32 continuously listens to the button state.

You will try this method . Working for me .

int R1 = 2;
NexDSButton bt0 = NexDSButton(0, 8, "bt0");
uint32_t dual_state=0;

void setup(){
nexInit();
pinMode(R1, OUTPUT);
}
void loop(){
bt0.getValue(&dual_state);
delay(200);

if(dual_state==1) //When pressed dual state button dual_state =1
  {
    digitalWrite(R1, HIGH);
  }
  else if(dual_state==0)
  {
    digitalWrite(R1,LOW ); 
  }

}

I think this method not sufficent. Because ESP32 continuously listens to the button state.

You will try this method . Working for me .

int R1 = 2;
NexDSButton bt0 = NexDSButton(0, 8, "bt0");
uint32_t dual_state=0;

void setup(){
nexInit();
pinMode(R1, OUTPUT);
}
void loop(){
bt0.getValue(&dual_state);
delay(200);

if(dual_state==1) //When pressed dual state button dual_state =1
  {
    digitalWrite(R1, HIGH);
  }
  else if(dual_state==0)
  {
    digitalWrite(R1,LOW ); 
  }

}

I think this method inefficent. Because ESP32 continuously listens to the button state.

You will try this method . Working for me .

int R1 = 2;
NexDSButton bt0 = NexDSButton(0, 8, "bt0");
uint32_t dual_state=0;

void setup(){
nexInit();
pinMode(R1, OUTPUT);
}
void loop(){
bt0.getValue(&dual_state);
delay(200);

if(dual_state==1) //When pressed dual state button dual_state =1
  {
    digitalWrite(R1, HIGH);
  }
  else if(dual_state==0)
  {
    digitalWrite(R1,LOW ); 
  }

}
Source Link
Loading