So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By Narfel
#70983 @rudy: Thank you that is exactly what i wanted. The variable and the pull-up resistor were what i was missing basically. Once i went through your code and mine i had trouble understanding mine more than yours 8-) Of course both voids need a digitalWrite and checking each other. My next step will be a proper debounce.

@jarnoldbrown: Thanks to you, too. I'm afraid what you described is a bit out of my league still, but the ticker concept in the setup makes total sense, i was already wondering how i would escape the blocking while in the setup and how i would add mqtt. Although the latter is not a must. The "offline" working no matter the wifi condition is paramount though since its gonna be used by a senior with little patience and wonky wifi :)
User avatar
By Narfel
#70994 @philbowles, @rudy: Thanks, much appreciated. I'm just getting started and i quickly realized that there is a solution, library or schematic for just about anything out there. Although i try starting from the very basics i am often just lacking the knowledge for what to search for so correcting lingo is helpful. Starting out in electronics and coding at the same time is daunting - not that one alone would be enough on its own - since both topics intersect and then suddenly don't intersect in cruel ways for a newbie. I quickly realized using ready made libraries can be very fast, even more secure, but without understanding the mechanics behind it frustrating. Heck, who knew a simple web-enabled relay would introduce me to concepts like a basic webserver, pull-up resistors, power supply (relay is 5V, esp supplies 3.3V) and i'm still just scratching the surface.