MildaGenius wrote:For your connecting, you must change pins to 13, 15 in your code.
I do not see D13 or D15 or are your probably referring to GPIO13 & GPIO15?
Do you have a diagram for the NodeMcu wiring?
THanks
Explore... Chat... Share...
MildaGenius wrote:For your connecting, you must change pins to 13, 15 in your code.
//HC-12 messenger send/receive
//autor Tom Heylen tomtomheylen.com
//UNO HC-12
//10 TXD
//11 RXD
//5V VCC
//GND GND
#include <SoftwareSerial.h>
SoftwareSerial mySerial(10, 11);//RX, TX
void setup() {
Serial.begin(115200);
mySerial.begin(9600);
delay(50);
}
void loop() {
if(Serial.available() > 0){//Read from serial monitor and send over HC-12
String input = Serial.readString();
mySerial.println(input);
Serial.print("input:");
Serial.println(input);
}
if(mySerial.available() > 1){//Read from HC-12 and send to serial monitor
String input = mySerial.readString();
Serial.println(input);
}
delay(2000);
}
//HC-12 messenger send/receive
//autor Tom Heylen tomtomheylen.com
//NodeMCU HC-12
//D2 TXD
//D3 RXD
//3V3 VCC
//GND GND
#include <SoftwareSerial.h>
SoftwareSerial mySerial(4, 0);//TX, RX on NodeMCU its pin D2 and D3
void setup() {
Serial.begin(115200);
mySerial.begin(9600);
delay(50);
}
void loop() {
if(Serial.available() > 0){//Read from serial monitor and send over HC-12
String input = Serial.readString();
mySerial.println(input);
Serial.print("input:");
Serial.println(input);
}
if(mySerial.available() > 1){//Read from HC-12 and send to serial monitor
String input = mySerial.readString();
Serial.println(input);
}
delay(2000);
}
ionu wrote:Thanks for the reply I only saw this today as it seem I am not getting the baord to tell me when someone replies.MildaGenius wrote:For your connecting, you must change pins to 13, 15 in your code.
I do not see D13 or D15 or are your probably referring to GPIO13 & GPIO15?
Do you have a diagram for the NodeMcu wiring?
THanks
SoftwareSerial mySerial(7,8 ); //RX, TX
// real GPIO pins
SoftwareSerial mySerial(13,15 ); //RX, TX
//mapped GPIO pins to NodeMCU pins
SoftwareSerial mySerial(D7,D8 ); //RX, TX
It takes about 20-25 seconds for home assistant c[…]
I tried to upgrade tof my sonoff basic R2 with the[…]
a problem Perhaps you want to define "Probl[…]
Rebooting your router will not give you a faster I[…]
There are no other notifications from esptool.py i[…]
Using the Arduino IDE, you'll learn how to set up […]
In this project, you will post to Twitter using an[…]
In this project, we will build a water level contr[…]
I guess I'm late, but I had the same problem and f[…]
Last night I received my first D1 Minis for a lear[…]
Although I am aware that this is an old post, I fe[…]