#define IO_USERNAME "Phattarapong"
#define IO_KEY "aio_phjy57LALv1h2wgkuqrnGrPXi4py"
#define WIFI_SSID "Wokwi-GUEST"
#define WIFI_PASS ""
#include "AdafruitIO_WiFi.h"
#if defined(USE_AIRLIFT) || defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE) || \
defined(ADAFRUIT_PYPORTAL)
#if !defined(SPIWIFI_SS)
#define SPIWIFI SPI
#define SPIWIFI_SS 10
#define NINA_ACK 9
#define NINA_RESETN 6
#define NINA_GPIO0 -1
#endif
AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS, SPIWIFI_SS,
NINA_ACK, NINA_RESETN, NINA_GPIO0, &SPIWIFI);
#else
AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);
#endif
AdafruitIO_Feed *PIR = io.feed("my-home-led");
int LED1 = 5;
int LED2 = 18;
void setup() {
pinMode(LED1, OUTPUT);
digitalWrite(LED1, LOW);
pinMode(LED2, OUTPUT);
digitalWrite(LED2, LOW);
}
void loop() {
digitalWrite(LED1, HIGH);
delay(50);
digitalWrite(LED2, HIGH);
delay(50);
digitalWrite(LED1, LOW);
delay(50);
digitalWrite(LED2, LOW);
delay(50);
}