#include <ESP8266WiFi.h>
#define MOSFET 2
#define SWITCH 0
#define DEBUG True
void setup() {
pinMode(SWITCH, INPUT); // Initialize the GPIO2 pin as an output
pinMode(MOSFET, OUTPUT);
digitalWrite(MOSFET, HIGH);
}
void loop() {
digitalWrite(MOSFET,HIGH);
// put your main code here, to run repeatedly:
}
But its not switching. What am I doing wrong? Pls help