Post topics, source code that relate to the Arduino Platform

User avatar
By sin
#8930 I have a ESP8266 wired correctly with external 3.3v supply and voltage divider (5v -> 3.3v).

Here is the code I'm trying to run:

Code: Select all#include <SoftwareSerial.h>

SoftwareSerial esp8266(10, 11); // RX, TX

void setup() 
{
  Serial.begin(9600);
  esp8266.begin(9600);
 
  esp8266.println("AT+CWJAP=\"myAPNAME\",\"myPASS\"");
}

void loop()
{
  if (esp8266.available())
    Serial.write(esp8266.read());
  if (Serial.available())
    esp8266.write(Serial.read());
}


I get strange output: Image

I can enter short commands manually and things work: Image

But longer commands do not work: Image

Why do long commands fail?
User avatar
By alonewolfx2
#8933 because arduinos default software serial buffer is small for esp8266. i had seen some modified software serial for arduino but i dont remember where. if you use hardware serial esp8266 commands working correctly
User avatar
By l0ur3nz0
#8943
alonewolfx2 wrote:because arduinos default software serial buffer is small for esp8266. i had seen some modified software serial for arduino but i dont remember where. if you use hardware serial esp8266 commands working correctly



this?
http://www.hobbytronics.co.uk/arduino-s ... uffer-size