HardwareSerial.h for esp8288 #7963
TiagoRSReis
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
hello, i'am tring to use this library for add one more serial port on my esp8266, but i think i am falling the syntax.
Can you help me? i want to chage the software serial for yours hardware serial.
'''
#include <SoftwareSerial.h>
SoftwareSerial mySerial(4, 0); //RX e TX D2,D3
#define Reception_enable 16 //Should be 0V D0
#define Delivery_enable 5 //Should be 5V D1
void setup()
{
mySerial.begin(9600);
pinMode(Reception_enable,OUTPUT);
pinMode(Delivery_enable,OUTPUT);
digitalWrite(Reception_enable,LOW);
digitalWrite(Delivery_enable,HIGH);
Serial.begin(9600);
}
void loop()
{
mySerial.write(35); // send a byte with the value 45
if(mySerial.available()){
Serial.print("Received: ");
Serial.println(mySerial.read());
}
} '''
Beta Was this translation helpful? Give feedback.
All reactions