Dear All .
I Have Problem in Program
I Create program for send data to web server , but when make verify for program give me some error, please help me .
#include <ESP8266WiFi.h>
const char*ssid="ssidename";
const char *password="ssidepassword";
int ledPin=D5;
String request;
// int index;
WiFiServer Server(80);
IPAddress ip(192,168,1,99);
IPAddress gateway(192,168,1,1);
");
client.println("Click <a href="/LED=ON">heretrun the LED on pin 5 ON
");
client.println("Click <a href="/LED=OFF">heretrun the LED on pin 5 OFF
");
client.println("");
delay(1);
Serial.println("Client disconnected");
Serial.println("");
Use Tools + Auto Format to fix your piss-poor indenting.
Of course, you won't be able to because your curly braces are all screwed up.
You can tweak the settings for Auto Format to move each curly brace on its own line if you want to, and other tricks too, such as removing blank lines in functions.
Before
void setup(){
Serial.begin(115200);
Serial.println("Hello");
Serial.println("After a blank line in the code");}
void loop()
{Serial.println("In loop");}
After Auto Format
void setup()
{
Serial.begin(115200);
Serial.println("Hello");
Serial.println("After a blank line in the code");
}
void loop()
{
Serial.println("In loop");
}
This is using Windows. Other OS's may be different.
In the IDE File/Preferences and click on the link to preferences.txt, although it is not obviously a link. In the folder that opens you will find a file named formatter.conf Open it with your favourite editor.
FWIW here is my version of formatter.conf which I have modified to suit me after some exerimentation
# This configuration file contains a selection of the available options provided by the formatting tool "Artistic Style"
# http://astyle.sourceforge.net/astyle.html
#
# If you wish to change them, don't edit this file.
# Instead, copy it in the same folder of file "preferences.txt" and modify the copy. This way, you won't lose your custom formatter settings when upgrading the IDE
# If you don't know where file preferences.txt is stored, open the IDE, File -> Preferences and you'll find a link
# 2 spaces indentation
indent=spaces=2
# also indent macros
indent-preprocessor
# indent classes, switches (and cases), comments starting at column 1
indent-classes
indent-switches
indent-cases
indent-col1-comments
# put a space around operators
# pad-oper
# put a space after if/for/while
pad-header
# if you like one-liners, keep them
# keep-one-line-statements
# Move opening brackets onto new line
--style=allman --style=bsd --style=break -A1
# delete empty lines in functions
--delete-empty-lines
#--delete-empty-lines / -xe
# Insert space padding around operators.
# --pad-oper / -p
--pad-oper