How do I connect my Arduino WiFi module?

i want to know about the setup of arduino wifi module| trying mny times| but not acceptable please suggest me the right way and a best way ?
thanks a lot
thanks a lot
Open Community Forum for ESP8266, Come share Arduino and IoT (Internet of Things)
https://www.esp8266.com/
/*
This sketch establishes a TCP connection to a "quote of the day" service.
It sends a "hello" message, and then prints received data.
*/
#include <ESP8266WiFi.h>
#ifndef STASSID
#define STASSID "your-ssid"
#define STAPSK "your-password"
#endif
const char* ssid = STASSID;
const char* password = STAPSK;
void setup() {
Serial.begin(115200);
// We start by connecting to a WiFi network
Serial.println();
Serial.println();
Serial.print("Connecting to ");
Serial.println(ssid);
WiFi.mode(WIFI_STA);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.println("WiFi connected");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
}
void loop() {
}
vijay02 wrote:i want to know about the setup of arduino wifi module| trying mny times| but not acceptable please suggest me the right way and a best way ?
thanks a lot
ranodon wrote:vijay02 wrote:i want to know about the setup of arduino wifi module| trying mny times| but not acceptable please suggest me the right way and a best way ?
thanks a lot
Change your SSID and password also...