-->
Page 1 of 1

How do I connect my Arduino WiFi module?

PostPosted: Mon Oct 19, 2020 12:18 am
by vijay02
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

Re: How do I connect my Arduino WiFi module?

PostPosted: Fri Feb 12, 2021 1:35 pm
by Tertius21
Replace your ssid and your password.

Code: Select all/*
    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() {

}

Re: How do I connect my Arduino WiFi module?

PostPosted: Sat Feb 13, 2021 6:59 am
by ranodon
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...

Re: How do I connect my Arduino WiFi module?

PostPosted: Fri Apr 16, 2021 6:46 am
by bazoocamwebcam
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...

If you change only SSId then it will works fine