Hi,
I am new here in forum, but have general know how in arduino and esp easy.
I start a test project with nodemcu, espeasy v2.0 and a normal cable between gnd or V3.3 and D6.
I'll test the witch function of esp easy. It work like here:
If I connect the D6 on GND, I get a "0"
If I connect the D6 on V3.3, I get a "1"
If I disconnect the D6 , I get the last status from last test. But this is bad.
This isn't usable for a normal switch (like a wall mounted switch in a house)
How you solve this problem?
normal switch without real function?
Moderators: grovkillen, Stuntteam, TD-er
-
- Normal user
- Posts: 15
- Joined: 21 Sep 2018, 11:05
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: normal switch without real function?
Typing this on my phone, but, have you looked into switch settings? Internal pull up etc?
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: normal switch without real function?
You need to add a pull-up or pull-down resistor, which ties the otherwise floating state of an unconnected pin to either HIGH or LOW. Of course, you can't distinguish between unconnected and switch open then.
-
- Normal user
- Posts: 15
- Joined: 21 Sep 2018, 11:05
Re: normal switch without real function?
In my settings, I switched to pull-up , but nothing happens.
Re: normal switch without real function?
If you've created a Switch device in ESPEasy, to D6-GPIO12 with "Internal Pullup" then after submitting it, you can measure 3.3V at the D6 pin on its own (without cable connected), and value of 1. If not, than try D5 or D7. If you connect it to GND with a cable, than it will go to 0. Except if you configured this pin to OUTPUT at the Hardware settings, which would surprise me, or if it is a faulty module.
-
- Normal user
- Posts: 15
- Joined: 21 Sep 2018, 11:05
Re: normal switch without real function?
okay, this works good with 3-pin mounted switch, but what about 2-pin ?
Re: normal switch without real function?
I do not really understand what you mean about 3-pin.thobastian wrote: ↑23 Sep 2018, 18:57 okay, this works good with 3-pin mounted switch, but what about 2-pin ?
I am using 2-pins. 1st is the GPIO and the 2nd pin is GND.
Who is online
Users browsing this forum: Ahrefs [Bot] and 32 guests