Hi, I would like to ask you (already search for that on this forum and on many google pages) and I would like to ask you for advice what I am doing wrong (please, be constructive).
First at all, my home simple project is about using ESP-01 to control light (let stripes).
How to control? By button and by wifi. (button, not switch).
Using DC 9V adapter + stepdown on 3.3V for ESP-01 + button + MOS module. Programming over programer module with extended button for “writing code”.
So I am using StepDown on 3.3V to power my esp01, but step down have Vo- (output minus). Didnt find better way than just switch it with gnd to make it positive (its looking very very ugly, but can someone provide better solution?) Because this one one works (I have +3.3V)
Trying to implement simple code which every 0.5s check if button is pressed, if yes = turn on MOS module. If in next checking will be button pressed again - its mean that user want to turn off the light = MOS module off. But didnt handle pins as GPIO/2 well because it do nothing. Can someone look on that scheme and code and say me what I am doing wrong?