Go Down

Topic: Problems with ESP8266 (Read 435 times) previous topic - next topic

xload

Hello, I bought this ESP8266 module http://www.ebay.es/itm/161686516055?_trksid=p2060353.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT

I'm trying this sketch:
Code: [Select]

#include <SoftwareSerial.h>
SoftwareSerial BT1(3, 2); // RX | TX

void setup()
  {  Serial.begin(9600);
     BT1.begin(9600);
  }

void loop()
  {  String B= "." ;
     if (BT1.available())
         { char c = BT1.read() ;
           Serial.print(c);
         }
     if (Serial.available())
         {  char c = Serial.read();
            BT1.print(c);
         }
   }


I only get trash from serial port like this:



:(

zoomkat

You might try using another baud rate like 115200.
Google forum search: Use Google Search box in upper right side of this page.
Why I like my 2005 Rio Yellow Honda S2000  https://www.youtube.com/watch?v=pWjMvrkUqX0

cwhummel

are you using a 5v arduino or a 3.3v? the esp8266 uses 3.3v, so if you have 5v arduino, you need to use a level shifter (or voltage divider) to properly read the serial data (and avoid possibly damaging your esp). Also, software serial to the esp is not the best.
"Beer is proof that god loves us and wants us happy" - a popular misquote of Benjamin Franklin, but true nonetheless.

Go Up