LEDs and buttons working

This commit is contained in:
Djuri 2023-11-08 12:18:59 +01:00
parent 4f2fbd8a36
commit 91fd921e2e
33 changed files with 3877 additions and 136 deletions

View file

@ -2,7 +2,6 @@
#include <WiFiClientSecure.h>
#include <Preferences.h>
#include <Adafruit_MCP23X17.h>
#include <Adafruit_NeoPixel.h>
#include "shared.hpp"
#include <esp_system.h>
@ -16,6 +15,7 @@
#include "lib/block_notify.hpp"
#include "lib/price_notify.hpp"
#include "lib/button_handler.hpp"
#include "lib/led_handler.hpp"
#define NTP_SERVER "pool.ntp.org"
#define DEFAULT_MEMPOOL_INSTANCE "mempool.space"
@ -23,6 +23,9 @@
#define USER_AGENT "BTClock/2.0"
#define MCP_DEV_ADDR 0x20
#define DEFAULT_FG_COLOR GxEPD_WHITE
#define DEFAULT_BG_COLOR GxEPD_BLACK
#define BITCOIND_HOST ""
#define BITCOIND_PORT 8332
#define BITCOIND_RPC_USER ""
@ -36,6 +39,7 @@ void setupHardware();
void tryImprovSetup();
void setupTimers();
void finishSetup();
std::map<int, std::string> getScreenNameMap();
std::vector<std::string> getLocalUrl();
bool improv_connectWifi(std::string ssid, std::string password);
@ -45,4 +49,3 @@ void onImprovErrorCallback(improv::Error err);
void improv_set_state(improv::State state);
void improv_send_response(std::vector<uint8_t> &response);
void improv_set_error(improv::Error error);
void blinkDelay(int d, int times);