I want to connect my Wemos D1 with this relay board (4 channel type)
http://www.icstation.com/icstation-micr ... -4012.html
I power the Wemos with a 9V external input and the board with an USB adapter.
To prevent voltage problems I use a voltage level shifter module.
the connections are as follow:
Wemos <--> Level shifter
GND -> GND
3.3 -> LV
RX -> L1
TX -> L2
Relay board <-> Level shifter
GND -> GND
5V -> HV
RX -> H2
TX -> H1
Now I want to use SoftwareSerial to avoid conflicts with the serial interface for debugging purpose
port=new SoftwareSerial(serialin, serialout);
pinMode(serialin, INPUT);
pinMode(serialout, OUTPUT);
port->begin(9600);
port->write(0x50);
port->write(0x51);
// turn relay on
port->write(0x00);
The relay module works well with a python script from the PC.
Any clues?
thank you for your time!