This time i want to share with you about how to connect esp32 NodeMCU with your home wifi. It’s just a simple code that you have to write on your arduino ESP32 NodeMCU. Before you start, the first thing you must know which board that you use. Like me, i’m using Arduino ESP32 NodeMCU, and here i share the pinout of the board.

Ok now, here is the code. The code is very simple. You can manipulate it to your other project.
#include "WiFi.h"
const char* ssid = "yourNetworkName";
const char* password = "yourNetworkPass";
void setup() {
Serial.begin(115200);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.println("Connecting to WiFi..");
}
Serial.println("Connected to the WiFi network");
// Print local IP address and start web server
Serial.println("");
Serial.println("WiFi connected.");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
}
void loop() {}
From the code below. You need to change some line to meet your requirement.
const char* ssid = “yourNetworkName”;
const char* password = “yourNetworkPass”;
So, amacam? Simple je kan? Aku memang share simple kod je. Tak nah la pening-pening kepala di kemudian hari. Lagipun aku park dekat sini supaya senang nanti aku nak cari. Orang jenis macam aku ni, satu je masalahnya. Selalu sangat lupa dengan benda-benda yang penting macam ni. Jadi aku decide, alang-alang aku wat youtube content aku tu. Aku park terus dekat sini. Dengan harapan, benda ni boleh bantu jugak korang nanti. Kalau korang ada apa-apa yang tak faham, atau x berapa nk jelas. Boleh lah rujuk dengan lecturer korang ye. Aku ni tak berapa reti nak ngajo orang yang sebenarnya. Tapi basic-basic tu boleh la aku jawab. Aku pun godek-godek je, usik sana sini tup-tup jadi, haaaa.
Recent Comments