Hello, I have no idea about ESPEasy and I think I have a very simple problem.
I have set up my WEMOS and only want to connect a GPIO input to a GPIO output. So if pin 13 (D7 / input) is switched, pin 14 (D5 / output) should also be switched.
I flashed everything and with the command "http://192.168.2.145/control?cmd=GPIO,14,0" pin 14 can also be switched.
Many thanks for the help
Adrian
Connect Input with output
Moderators: grovkillen, Stuntteam, TD-er
Re: Connect Input with output
Ah, yes, this is not as clear as it could be.
Easiest to achieve that is by adding a Switch device on the devices page (name it 'Switch' please, and set Enabled on) that is configured to GPIO13/D7, and set the de-bounce value to 150 msec.
Next you should enable the Rules option on Tools/Advanced page, then a new tab Rules will be added to the list of tabs (may require a browser refresh).
Then in the first Rules file you can add this code:
If the output is the reverse of what you need, enable the 'Inverted Logic' checkbox in the Switch device.
If you want to state to be reflected faster on the Devices page, then the 'Interval' setting on the Switch can be set to a lower value (down to 1).
Easiest to achieve that is by adding a Switch device on the devices page (name it 'Switch' please, and set Enabled on) that is configured to GPIO13/D7, and set the de-bounce value to 150 msec.
Next you should enable the Rules option on Tools/Advanced page, then a new tab Rules will be added to the list of tabs (may require a browser refresh).
Then in the first Rules file you can add this code:
Code: Select all
on Switch#State do
GPIO,14,%eventvalue1%
endon
If you want to state to be reflected faster on the Devices page, then the 'Interval' setting on the Switch can be set to a lower value (down to 1).
/Ton (PayPal.me)
-
- Normal user
- Posts: 13
- Joined: 15 Sep 2020, 18:14
Re: Connect Input with output
Thank you very much you helped me a lot.
Who is online
Users browsing this forum: No registered users and 46 guests