Node MCU Wireless Switch Delatch button

Moderators: adafruit_support_bill, adafruit

Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
Locked
User avatar
abhirupbera
 
Posts: 4
Joined: Fri Aug 20, 2021 2:53 am

Node MCU Wireless Switch Delatch button

Post by abhirupbera »

I have made this project with two node mcu.... https://create.arduino.cc/projecthub/sh ... -io-a9fd6b
But now the problem is after pressing pushbutton the output pin is HIGH upto when I am pressing again the pushbutton to make it LOW. My project requirement is to make the output pin HIGH as long as the input pin is HIGH. If released output will be LOW immediately.
Thanks in advance!

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Node MCU Wireless Switch Delatch button

Post by adafruit_support_mike »

You'll need to modify the code. As written, the code switches from one state to another. You can change it to match the current state of the tact switch.

User avatar
abhirupbera
 
Posts: 4
Joined: Fri Aug 20, 2021 2:53 am

Re: Node MCU Wireless Switch Delatch button

Post by abhirupbera »

Mike, I have tried a lot. But no positive results. Please guide about the coding.

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Node MCU Wireless Switch Delatch button

Post by adafruit_support_mike »

Take a look at the Digital Inputs tutorial from our Learn Arduino series:

https://learn.adafruit.com/adafruit-ard ... tal-inputs

That does what you want.

User avatar
abhirupbera
 
Posts: 4
Joined: Fri Aug 20, 2021 2:53 am

Re: Node MCU Wireless Switch Delatch button

Post by abhirupbera »

Mike,
Thanks for the support. It worked like a charm but only one digital input and one output. tried to modify the code to get 3 Digital inputs & outputs, but no outcome. Please put some more light to get success.
Thanks in advance.

Locked
Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.

Return to “Internet of Things: Adafruit IO and Wippersnapper”