Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <SPI.h>
- #include <ESP8266WiFi.h>
- //SSID of your network
- char ssid[] = "Heu heu heu";
- //password of your WPA Network
- char pass[] = "siapakamu";
- int biru = 5;
- int merah = 16;
- int ijo = 4;
- void setup() {
- // put your setup code here, to run once:
- Serial.begin(9600);
- WiFi.begin(ssid, pass);
- Serial.print("Connecting");
- while(WiFi.status() != WL_CONNECTED){
- Serial.print(".");
- delay(500);
- }
- pinMode(biru, OUTPUT);
- pinMode(ijo, OUTPUT);
- pinMode(merah, OUTPUT);
- Serial.println();
- // if you are connected, print out info about the connection:
- }
- void loop() {
- long rssi = WiFi.RSSI();
- Serial.print("RSSI:");
- Serial.println(rssi);
- delay(1000);
- // put your main code here, to run repeatedly:
- digitalWrite(biru, HIGH);
- delay(1000);
- digitalWrite(merah, HIGH);
- delay(1000);
- digitalWrite(biru, LOW);
- delay(1000);
- digitalWrite(ijo, HIGH);
- delay(1000);
- digitalWrite(merah, LOW);
- delay(1000);
- digitalWrite(ijo, LOW);
- delay(1000);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement