I am looking to set up an ATTINY85 chip with two softwareserial
One softwareserial communicates with RXTX of arduino uno board
Second software serial communicates with ESP8266 chip
I am using below sketch:
#include <SoftwareSerial.h>
SoftwareSerial arduino(0,1); //rx,tx
SoftwareSerial wifi(2,3); //rx,tx
void setup() {
arduino.begin(9600);
arduino.println("ATTINY85 Ready");
wifi.begin(9600);
}
void loop() {
wifi.listen();
while (wifi.available() > 0) {
char inByte = wifi.read();
arduino.write(inByte);
}
arduino.listen();
while (arduino.available() > 0) {
char inByte = arduino.read();
wifi.write(inByte);
}
}
I have changed the baudrate on the ESP8266 to 9600
When I test this I get ATTINY85 Ready in my serial monitor.
I connect power to ESP8266 and it does send serial connection data however it is garbled
When I connect the ESP8266 directly to the arduino it shows correct connection information at 9600 baud (not garbled)
Somewhere in the receiving of the serial data from the ESP to sending it out from the ATTINY85 it is getting garbled.
Anyone know why this is happening and a possible patch for the sketch to remedy it?