I am trying to use baudrate 115200 to send a data faster this is my arduino code.
/*
WiFiEsp example: WebClient
This sketch connects to google website using an ESP8266 module to
perform a simple web search.
For more details see: http://yaab-arduino.blogspot.com/p/wifiesp-example-client.html
*/
#include "WiFiEsp.h"
// Emulate Serial1 on pins 6/7 if not present
#ifndef HAVE_HWSERIAL1
#include "SoftwareSerial.h"
SoftwareSerial Serial1(2, 3); // RX, TX
#endif
char ssid[] = "ACT103700825351"; // your network SSID (name)
char pass[] = "25851250"; // your network password
int status = WL_IDLE_STATUS; // the Wifi radio's status
char server[] = "arduino.cc";
// Initialize the Ethernet client object
WiFiEspClient client;
void setup()
{
// initialize serial for debugging
Serial.begin(115200);
// initialize serial for ESP module
Serial1.begin(9600);
// initialize ESP module
WiFi.init(&Serial);
// attempt to connect to WiFi network
while ( status != WL_CONNECTED) {
Serial1.print("Attempting to connect to WPA SSID: ");
Serial1.println(ssid);
// Connect to WPA/WPA2 network
status = WiFi.begin(ssid, pass);
}
// you're connected now, so print out the data
Serial1.println("You're connected to the network");
printWifiStatus();
Serial1.println();
Serial1.println("Starting connection to server...");
// if you get a connection, report back via Serial1
if (client.connect("192.168.0.104", 8000)) {
Serial1.println("Connected to server");
// Make a HTTP request
client.println("GET /asciilogo.txt HTTP/1.1");
client.println("Host: arduino.cc");
client.println("Connection: close");
client.println();
client.println(F("POST /simple_upload/ HTTP/1.1"));
client.print(F("Host: "));
client.println(F("192.168.0.104:8000"));
client.println(F("Connection: close"));
}
}
void loop()
{
// if there are incoming bytes available
// from the server, read them and print them
while (client.available()) {
char c = client.read();
Serial1.write(c);
}
// if the server's disconnected, stop the client
if (!client.connected()) {
Serial1.println();
Serial1.println("Disconnecting from server...");
client.stop();
// do nothing forevermore
while (true);
}
}
void printWifiStatus()
{
// print the SSID of the network you're attached to
Serial1.print("SSID: ");
Serial1.println(WiFi.SSID());
// print your WiFi shield's IP address
IPAddress ip = WiFi.localIP();
Serial1.print("IP Address: ");
Serial1.println(ip);
// print the received signal strength
long rssi = WiFi.RSSI();
Serial1.print("Signal strength (RSSI):");
Serial1.print(rssi);
Serial1.println(" dBm");
}
In this the Output at serial port 115200 is as follows
I am trying to use baudrate 115200 to send a data faster this is my arduino code.
In this the Output at serial port 115200 is as follows
But on software serial for checking debug serial value I get
Based on the serial output at port 115200, I can see it is connected, but why I am not getting the same in software serial?
Need help to know where I am doing wrong and how to make the code work?