Skip to content

Instantly share code, notes, and snippets.

@IsmailSan

IsmailSan/RGB LED_WiFi

Last active Sep 17, 2019
Embed
What would you like to do?
#include <Arduino.h>
#include <WiFi.h>
#include <ESPectro32_Board.h>
#include <ESPectro32_RGBLED_Animation.h>
RgbLedColor_t aCol(200, 0, 0);
RgbLedColor_t bCol(0, 200, 0);
ESPectro32_RGBLED_GlowingAnimation glowAnim1(ESPectro32.RgbLed(), aCol);
ESPectro32_RGBLED_GlowingAnimation glowAnim2(ESPectro32.RgbLed(), bCol);
const char *ssid="Your ssid"; //Nama Wi-Fi
const char *password="Your password"; //Nama Password
void setup() {
Serial.begin(9600);
Serial.print("connecting to");
Serial.println(ssid);
WiFi.begin(ssid, password); // Memulai Koneksi
while (WiFi.status() != WL_CONNECTED) {
delay(500);
glowAnim1.start(3000);
}
Serial.print("your ssid : ");
Serial.println(ssid);
Serial.print("your password : ");
Serial.println(password);
Serial.print("IP address : ");
Serial.println(WiFi.localIP());
glowAnim2.start(3000);
}
void loop() {
delay(100);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment