Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion EServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ bool EmlaServer::Connect2WiFi(const char *ssid, const char *password, int timeou
Serial.print("Attempting to connect to SSID: ");
Serial.println(ssid);
#ifdef ESP8266
WiFi.setInsecure();
// WiFi.setInsecure();
#endif
WiFi.begin(ssid, password);

Expand Down
4 changes: 4 additions & 0 deletions HTTPSP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
*/

#include <Arduino.h>
#ifdef ESP32
#include <esp32-hal-log.h>
#endif

#ifdef HTTPCLIENT_1_1_COMPATIBLE
#include <WiFi.h>
Expand Down Expand Up @@ -73,9 +75,11 @@ class TLSTraits : public TransportTraits
bool verify(WiFiClient& client, const char* host) override
{
WiFiClientSecure& wcs = static_cast<WiFiClientSecure&>(client);
#ifdef ESP32
wcs.setCACert(_cacert);
wcs.setCertificate(_clicert);
wcs.setPrivateKey(_clikey);
#endif
return true;
}

Expand Down
6 changes: 5 additions & 1 deletion Main.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#ifdef ESP32
#include "esp32-hal-ledc.h"
#endif
#include "Oled.h"
#include "Defs.h"
#include "TimeF.h"
Expand Down Expand Up @@ -44,11 +46,13 @@ void setup()
// OLED
oledDisplay.Init();

// servo
// servo only supported for ESP32
#ifdef ESP32
// channel 1, 50 Hz, 16 bit width
ledcSetup(1, 50, 16);
// GPIO 2 attached to channel 1
ledcAttachPin(SERVO_PIN, 1);
#endif

// --------------------------------------------------------------------------
// WiFi connection
Expand Down
3 changes: 3 additions & 0 deletions Session.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ void Session::Lock()
// ------------------------------------------------------------------------
void Session::ForcedUnlock()
{
// servo only supported for ESP32
#ifdef ESP32
oledDisplay.PrintDisplay("Unlock GRANTED!");
ledcAttachPin(SERVO_PIN, 1);
delay(50);
Expand All @@ -100,6 +102,7 @@ void Session::ForcedUnlock()
ledcWrite(1, 999);
delay(500);
ledcDetachPin(SERVO_PIN);
#endif
}


Expand Down