This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Mock External Library Definitions | |
func mockAsyncFunction(completion: @escaping (String?, MockError?) -> Void ) { | |
DispatchQueue.main.asyncAfter(deadline: .now() + 5) { | |
completion("mockAsyncFunction completed successfully", nil) | |
// uncomment the below line and comment the one above to return an error | |
// completion(nil, MockError.asyncError) | |
} | |
} | |
enum MockError: Error, LocalizedError { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Import required libraries | |
#include <ESP8266WiFi.h> | |
#include <ESP8266WebServer.h> | |
#include <WiFiClient.h> | |
#include <Servo.h> | |
#include <ESP8266mDNS.h> | |
//Static IP address configuration | |
IPAddress staticIP(192, 168, 1, 176); //ESP static ip | |
IPAddress gateway(192, 168, 1, 1); //IP Address of your WiFi Router (Gateway) |