Button as an Button

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
DasQ
New user
Posts: 5
Joined: 19 Mar 2018, 10:49

Button as an Button

#1 Post by DasQ » 19 Mar 2018, 12:01

Hi,

i am Andy, 45 years old and from germany, my written english is not the best, so i will try to discribe my problem.
i flashed last week one of my nodemcu 0.9 with the fancy espeasy firmware.
after long time reading and looking for informations about my problem, i will ask at this forum.

so i want to made a thermometer and hygrostat with an dht22 (aka 2302), display on an 1602 LCD with i2c ... so far so good.
this will be work easy but now my problem. i made an simple button to wake up the background light from the lcd. so i put from one the gpio (d4) to the button with an 10k resistor to ground.
it will be change a bit at the devicetab form 0 to 1 and from 1 to 0 each time i press the button, but i want that the button only the time i press a 1 und unpressed 0.

next, in the device LCD2004 is an option button, if i select the same gpio from this button, nothing happens. where is my thinkingerror.
is this possiple, to turn on and off the background light, with a single push from the button?

thanks and sorry for my bad english.

cu andy

User avatar
toffel969
Normal user
Posts: 469
Joined: 03 Jan 2017, 10:58
Location: Germany

Re: Button as an Button

#2 Post by toffel969 » 19 Mar 2018, 15:17

Hi, change switch-type from active low to normal switch
Domoticz on Raspi 2 -- 14 ESP units (hacked Sonoff,NodeMCUs, Wemos, self-built units) running with RC140- Mega 2.0.0 dev8

User avatar
vader
Normal user
Posts: 241
Joined: 21 Mar 2017, 17:35

Re: Button as an Button

#3 Post by vader » 19 Mar 2018, 15:28

Why a 10k resistor to ground? Check 'Internal PullUp' for the switch and switch GND. Or must you switch Vcc?

DasQ
New user
Posts: 5
Joined: 19 Mar 2018, 10:49

Re: Button as an Button [solved]

#4 Post by DasQ » 19 Mar 2018, 21:42

thank`s a lot :D

you are the best,


in german we said: sometime do not see the forest for the trees

DasQ
New user
Posts: 5
Joined: 19 Mar 2018, 10:49

Re: Button as an Button

#5 Post by DasQ » 07 Nov 2018, 19:14

For the german guy how ask me for the Solution about this Problem. 2. 3. Screenshot
BTW. My biggest Problem was an bug in the firmeware at my First trys.

On the First Screenshot we See how its possible to switch off the Display for night
Attachments
807C6A36-C0FD-49E9-9E1B-09E329AD39BC.png
807C6A36-C0FD-49E9-9E1B-09E329AD39BC.png (245.4 KiB) Viewed 4536 times
F2D2FEB2-8B9C-4329-A405-A6C7C2CFD849.png
F2D2FEB2-8B9C-4329-A405-A6C7C2CFD849.png (235.06 KiB) Viewed 4536 times
8C3283D4-0999-46FD-8F18-37D9248EF474.png
8C3283D4-0999-46FD-8F18-37D9248EF474.png (178.73 KiB) Viewed 4536 times

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 44 guests