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

User avatar
By shahar077
#86952 im curently making a simple switch my one issue is that when i connet my nodemcu to the power supply it wont run the code if my relay is connected to 3v3 or any power pin but if i start the nodemcu without the relay connected and after it boots i connect the relay it works fine any suggetions on how to fix this issue since its the only reason i cant solder and finish my project
User avatar
By QuickFix
#87038 Some hints (since you didn't share any details with us):
  • Don't connect a relay directly to a GPIO since it can only deliver around 12mA and a relay (almost) always need a multitude of that. Use a switching transistor in between.
  • Don't connect a relay (or any low resistence component) to GPIO0, GPIO2 or GPIO15 (D3, D4 or D8 on the NodeMCU) since these are needed to properly boot the ESP.