I am using NODEMCU V1.0 and ARDUNIO UNO and 8ch RELAY BOARD...for communication between NODE and UNO i am using serial.swap (D7 and D8) and i cannot use all 8 relays, but only 7 (D0,D1,D2,D3,D4,D5,D6)....how to connect 8th relay?
what is strange is when i am trying to use rx/tx pins on node i will be able to connect 8 relays but i cannot have serial communication...
does anyone know how to connect 8 relays in this project?
Why is the UNO included? It would make more sense to use the NodeMCU for WiFi access and the UNO for its I/O - but that doesn't seem to be the arrangement.
Let me explain @runaway_pancake ..... UNO has 3 acs712 sensors for measuring energy using A0, A1 and A2...NODE is used for WiFi and communication with MQTT....it works good but problem is that i cannot attach 8 relays but only 7....rx/tx works good when i am using D7 and D8 on NODE with serial.swap, but when i am using rx/tx on NODE instead of D7/D8, i cannot get serial communication between NODE/UNO...
Did not think about that....do i have enough digital pins on UNO for 8 relays?
i wanted node to be used for communication with mqtt server and to turn relays on/off, UNO to measure and calculate energy consumption, and not to be disturbed by toggling relays on off
also i would like to know if node is able to run 8 relays when i am using serial.swap, there must be the way
That's what I want to know too... I have one power supply 5v 3A, which is connected in one point from which one end goes to arduino connector 5v, second end goes to jdvcc for relays and third one goes to usb of nodemcu... Also Vcc pin on 8ch board relay is connected to VV pin of Nodemcu...
Maybe my connection way is not good... What do you think, where am I wrong?
Some esp8266 boards fail to have serial on "serial pins", because of how they are connected to usb chip if I remember well...
Anyway, that shouldn't prevent you to use TX pin (GPIO1) for your relay. It's high on boot, but so is D0...
If it doesn't work, you should be able to use GPIO10 (SD3) pin as output. Flash mode has to be DIO or DOUT, which I believe is arduino default for your board.
You used serial.swap but so D7 and D8 pins are used for serial communication.. I want to use rx tx on node... Just make it clear... If I am using serial swap and D7 and D8 for serial how to get 8 relays, how to use sd3 for relay?
I understood you had one pin missing for your setup.
If your RX TX (1, 3) pins don't work for serial, you need to make swap. An you could use 1 as output.
If that's not enough, you have 9 (SD2) and 10 (SD3) available if your flash mode is DIO or DOUT.