           }
           https.end();
         } else {
-          Serial.println("Unable to connect.");
+          Serial.println("Connection failed.");
         }
       }
     }

#include <ESP8266HTTPClient.h>
#include <WiFiClientSecureBearSSL.h>

String kBaseUrl = "https://docs.google.com/forms/d/e/YOUR_SPREADSHEET_ID/formResponse?entry.ENTRY_CODE=";
// Client fingerprint, to generate, use:
//   openssl s_client -connect docs.google.com:443 < /dev/null 2>/dev/null | openssl x509 -fingerprint -noout -in /dev/stdin
constexpr char kFingerprint[] = "5B:E1:DA:24:FE:99:92:FB:D2:AB:A8:DD:E9:49:AF:3A:56:43:F1:B4";
constexpr char kApSsid[] = "YOUR_SSID";
constexpr char kApPassword[] = "";
constexpr int kPin = 5;

ESP8266WiFiMulti WiFiMulti;

int pulse_count = 0;
int previous_state = LOW;
int current_state;
unsigned long previous_debounce_ms = 0;
constexpr unsigned long kDebounceDelayMs = 50;

void setup() {
  pinMode(kPin, INPUT_PULLUP);

      current_state = state;
      if (current_state == LOW) {
        std::unique_ptr<BearSSL::WiFiClientSecure>client(new BearSSL::WiFiClientSecure);
        client->setInsecure();

        HTTPClient https;
        if (https.begin(*client, kBaseUrl + String(++pulse_count))) {
