Comments (11)
Probably not supplying the correct pinout. Also you would need to define "RELAY1" to the pin you're using.
Google how to use relay with Arduino, and you will get your basic setup. Also there are several videos of the NodeMCU used with relays.
No need to post under issues, as you're inability to use a simple relay is not an issue with NodeMCU
from nodemcu-devkit-v1.0.
If I connect led anode (+) to the same GPIO and led catode (-) to GND it works so GPIO is controlled correctly, but if the same GPIO is connected to IN pin of relay, it doesn't work.
from nodemcu-devkit-v1.0.
from nodemcu-devkit-v1.0.
Many thanks but it is what I've done and I'm sure that relay is connected well, as explained on internet. You haven't understand my question. I think that the problem is that this relay board work with low signal, GND to be clear. But a GPIO is not able to send a GND signal bit a positive signal from 0 to 3.3V. I think that with a transistor I can resolve but I'm searching other solutions.
from nodemcu-devkit-v1.0.
No, relays work the same. You have POWER or NO POWER to the input/trigger. Which Opens or Closes the gate/circuit depending on the NC/NO state of the relay. By connecting to GND you are basically providing NO POWER to the input/trigger.
You are almost 100% referencing the wrong GPIO in your code, or have not correctly defined your pin
from nodemcu-devkit-v1.0.
Ok but I've wrote that if I connect a led in the place of relay, it work so GPIO work.
from nodemcu-devkit-v1.0.
I think this is the solution:
https://iot-playground.com/images/articles/053/ESP8266_4_relay_switch.png
from nodemcu-devkit-v1.0.
Again, relay works the same. I have a 8 RELAY system that controls the lights in my work shop off a NodeMCU, and each relay input/trigger is connected to a GPIO. No need for any resistors (or in the case of the link you provided NO transistor) to make the relay work.
I even have a 2 channel relay sitting right here, that I just tested on a spare NodeMCU, and again no resistor or transistor needed.
from nodemcu-devkit-v1.0.
Probably my relay is different from your. I don't know.
from nodemcu-devkit-v1.0.
THEY ALL WORK THE SAME! FFS
from nodemcu-devkit-v1.0.
My relay turn on with pin IN connected to GND or also to 3.3V. GPIO pin from MCU turn from 0V to 3.3V but I don't understand why it cannot turn on relay. I've solved with circuit with transistor.
Bye
from nodemcu-devkit-v1.0.
Related Issues (20)
- Can we get the ASCII versions of .pcbdoc and .schdoc?
- Very low power
- A0 adc limit input? HOT 1
- Gerber file latest version HOT 10
- proteus design for circuit design HOT 6
- Schematic from V3 HOT 2
- Unable to upload using Arduino or esptool.py
- Nodemcu board could not handle 16v ? HOT 1
- Voltage peaks in nodeMCU
- Output Current of Digital Pins
- Node mcu stop working and start blinking on board led HOT 1
- Failure of the Reset circuit of the NodeMCU
- Arduino crashing on Mac, nodemcu ESP8266 doesn't connect issues Siliconlabs SI driver doesn't work HOT 1
- Is node mcu lolin v3 schematic diagram or pcb doc files available? Searched for that but unable to find out. If available with any one please share.
- HTML server down after a while (STA mode)
- Nodemcu amica with proximity sensor for metals
- GPIO14 pin (D5) not working HOT 1
- Pinout Documentation HOT 2
- Uploading code to nodemcu in proteus
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nodemcu-devkit-v1.0.