Closed renandw closed 4 years ago
You're using GPIO 1 and 3 to control your relays, but they are part of UART0 interface which is used to communicate with the board over USB. The moment you do gpio_enable() on those your serial interface stops working. IMO it's OK to use GPIO3 since people rarely transmit something to MCU, but GPIO1 should not be used.
This is a pretty tight setup but doable. I've done 4-button-4-relays firmwares in the past and here is my GPIO config: buttons = [0, 2, 4, 5], relays = [12, 13, 14, 16]. I haven't done a reset button though, but you can do the following: use GPIO 0 as reset/control button and use GPIO 3 as one of button inputs.
Generally, there is a good article on what pins can be used where, which you can easily google with "esp8266 what pins to use".
Thanks a lot @maximkulkin. I made those changes and not only the logs are fine, but the bugs are also gone. Thanks for the help
Hello. I am working on a code that allows me to control 4 relays controlled by an individual toggle, and a button to reset configuration. But for some reason, the logs, when I use "make flash monitor", stops. But I can configure wifi, pair it to HomeKit and everything. But some bugs show up and I can't see why.
the Makefile is here
is something that I am forgetting? thanks