init
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
build/
|
||||
7
.vscode/arduino.json
vendored
Normal file
7
.vscode/arduino.json
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"configuration": "PSRAM=disabled,PartitionScheme=default,CPUFreq=240,FlashMode=qio,FlashFreq=80,FlashSize=4M,UploadSpeed=921600,DebugLevel=none",
|
||||
"board": "esp32:esp32:esp32",
|
||||
"port": "COM10",
|
||||
"sketch": "dnddice.ino",
|
||||
"output": "build"
|
||||
}
|
||||
356
.vscode/c_cpp_properties.json
vendored
Normal file
356
.vscode/c_cpp_properties.json
vendored
Normal file
@@ -0,0 +1,356 @@
|
||||
{
|
||||
"version": 4,
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Arduino",
|
||||
"compilerPath": "C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\xtensa-esp32-elf-gcc\\1.22.0-97-gc752ad5-5.2.0\\bin\\xtensa-esp32-elf-g++",
|
||||
"compilerArgs": [
|
||||
"-std=gnu++11",
|
||||
"-Wpointer-arith",
|
||||
"-fexceptions",
|
||||
"-fstack-protector",
|
||||
"-ffunction-sections",
|
||||
"-fdata-sections",
|
||||
"-fstrict-volatile-bitfields",
|
||||
"-mlongcalls",
|
||||
"-nostdlib",
|
||||
"-w",
|
||||
"-Wno-error=maybe-uninitialized",
|
||||
"-Wno-error=unused-function",
|
||||
"-Wno-error=unused-but-set-variable",
|
||||
"-Wno-error=unused-variable",
|
||||
"-Wno-error=deprecated-declarations",
|
||||
"-Wno-unused-parameter",
|
||||
"-Wno-unused-but-set-parameter",
|
||||
"-Wno-missing-field-initializers",
|
||||
"-Wno-sign-compare",
|
||||
"-fno-rtti"
|
||||
],
|
||||
"intelliSenseMode": "gcc-x64",
|
||||
"includePath": [
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\config",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\app_trace",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\app_update",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\asio",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\bootloader_support",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\bt",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\coap",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\console",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\driver",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\efuse",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\esp-tls",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\esp32",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\esp_adc_cal",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\esp_event",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\esp_http_client",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\esp_http_server",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\esp_https_ota",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\esp_https_server",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\esp_ringbuf",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\esp_websocket_client",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\espcoredump",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\ethernet",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\expat",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\fatfs",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\freemodbus",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\freertos",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\heap",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\idf_test",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\jsmn",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\json",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\libsodium",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\log",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\lwip",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\mbedtls",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\mdns",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\micro-ecc",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\mqtt",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\newlib",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\nghttp",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\nvs_flash",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\openssl",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\protobuf-c",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\protocomm",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\pthread",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\sdmmc",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\smartconfig_ack",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\soc",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\spi_flash",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\spiffs",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\tcp_transport",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\tcpip_adapter",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\ulp",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\unity",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\vfs",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\wear_levelling",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\wifi_provisioning",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\wpa_supplicant",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\xtensa-debug-module",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\esp-face",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\esp32-camera",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\esp-face",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\sdk\\include\\fb_gfx",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\cores\\esp32",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\variants\\esp32",
|
||||
"C:\\Users\\nathan\\Documents\\Arduino\\libraries\\TFT_eSPI",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\libraries\\SPI\\src",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\libraries\\FS\\src",
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\libraries\\SPIFFS\\src",
|
||||
"c:\\users\\nathan\\appdata\\local\\arduino15\\packages\\esp32\\tools\\xtensa-esp32-elf-gcc\\1.22.0-97-gc752ad5-5.2.0\\xtensa-esp32-elf\\include\\c++\\5.2.0",
|
||||
"c:\\users\\nathan\\appdata\\local\\arduino15\\packages\\esp32\\tools\\xtensa-esp32-elf-gcc\\1.22.0-97-gc752ad5-5.2.0\\xtensa-esp32-elf\\include\\c++\\5.2.0\\xtensa-esp32-elf",
|
||||
"c:\\users\\nathan\\appdata\\local\\arduino15\\packages\\esp32\\tools\\xtensa-esp32-elf-gcc\\1.22.0-97-gc752ad5-5.2.0\\xtensa-esp32-elf\\include\\c++\\5.2.0\\backward",
|
||||
"c:\\users\\nathan\\appdata\\local\\arduino15\\packages\\esp32\\tools\\xtensa-esp32-elf-gcc\\1.22.0-97-gc752ad5-5.2.0\\lib\\gcc\\xtensa-esp32-elf\\5.2.0\\include",
|
||||
"c:\\users\\nathan\\appdata\\local\\arduino15\\packages\\esp32\\tools\\xtensa-esp32-elf-gcc\\1.22.0-97-gc752ad5-5.2.0\\lib\\gcc\\xtensa-esp32-elf\\5.2.0\\include-fixed",
|
||||
"c:\\users\\nathan\\appdata\\local\\arduino15\\packages\\esp32\\tools\\xtensa-esp32-elf-gcc\\1.22.0-97-gc752ad5-5.2.0\\xtensa-esp32-elf\\include",
|
||||
"c:\\users\\nathan\\appdata\\local\\arduino15\\packages\\esp32\\tools\\xtensa-esp32-elf-gcc\\1.22.0-97-gc752ad5-5.2.0\\xtensa-esp32-elf\\sysroot\\usr\\include"
|
||||
],
|
||||
"forcedInclude": [
|
||||
"C:\\Users\\nathan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\cores\\esp32\\Arduino.h"
|
||||
],
|
||||
"cStandard": "c11",
|
||||
"cppStandard": "c++11",
|
||||
"defines": [
|
||||
"ESP_PLATFORM",
|
||||
"MBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\"",
|
||||
"HAVE_CONFIG_H",
|
||||
"GCC_NOT_5_2_0=0",
|
||||
"WITH_POSIX",
|
||||
"F_CPU=240000000L",
|
||||
"ARDUINO=10813",
|
||||
"ARDUINO_ESP32_DEV",
|
||||
"ARDUINO_ARCH_ESP32",
|
||||
"ARDUINO_BOARD=\"ESP32_DEV\"",
|
||||
"ARDUINO_VARIANT=\"esp32\"",
|
||||
"ESP32",
|
||||
"CORE_DEBUG_LEVEL=0",
|
||||
"__DBL_MIN_EXP__=(-1021)",
|
||||
"__UINT_LEAST16_MAX__=0xffff",
|
||||
"__ATOMIC_ACQUIRE=2",
|
||||
"__FLT_MIN__=1.1754943508222875e-38F",
|
||||
"__GCC_IEC_559_COMPLEX=0",
|
||||
"__UINT_LEAST8_TYPE__=unsigned char",
|
||||
"__INTMAX_C(c)=c ## LL",
|
||||
"__CHAR_BIT__=8",
|
||||
"__UINT8_MAX__=0xff",
|
||||
"__WINT_MAX__=0xffffffffU",
|
||||
"__ORDER_LITTLE_ENDIAN__=1234",
|
||||
"__SIZE_MAX__=0xffffffffU",
|
||||
"__WCHAR_MAX__=0xffff",
|
||||
"__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1=1",
|
||||
"__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2=1",
|
||||
"__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4=1",
|
||||
"__DBL_DENORM_MIN__=double(4.9406564584124654e-324L)",
|
||||
"__GCC_ATOMIC_CHAR_LOCK_FREE=2",
|
||||
"__GCC_IEC_559=0",
|
||||
"__FLT_EVAL_METHOD__=0",
|
||||
"__cpp_binary_literals=201304",
|
||||
"__GCC_ATOMIC_CHAR32_T_LOCK_FREE=2",
|
||||
"__UINT_FAST64_MAX__=0xffffffffffffffffULL",
|
||||
"__SIG_ATOMIC_TYPE__=int",
|
||||
"__DBL_MIN_10_EXP__=(-307)",
|
||||
"__FINITE_MATH_ONLY__=0",
|
||||
"__GNUC_PATCHLEVEL__=0",
|
||||
"__UINT_FAST8_MAX__=0xffffffffU",
|
||||
"__has_include(STR)=__has_include__(STR)",
|
||||
"__DEC64_MAX_EXP__=385",
|
||||
"__INT8_C(c)=c",
|
||||
"__UINT_LEAST64_MAX__=0xffffffffffffffffULL",
|
||||
"__SHRT_MAX__=0x7fff",
|
||||
"__LDBL_MAX__=1.7976931348623157e+308L",
|
||||
"__UINT_LEAST8_MAX__=0xff",
|
||||
"__GCC_ATOMIC_BOOL_LOCK_FREE=2",
|
||||
"__UINTMAX_TYPE__=long long unsigned int",
|
||||
"__DEC32_EPSILON__=1E-6DF",
|
||||
"__CHAR_UNSIGNED__=1",
|
||||
"__UINT32_MAX__=0xffffffffUL",
|
||||
"__LDBL_MAX_EXP__=1024",
|
||||
"__WINT_MIN__=0U",
|
||||
"__SCHAR_MAX__=0x7f",
|
||||
"__WCHAR_MIN__=0",
|
||||
"__INT64_C(c)=c ## LL",
|
||||
"__DBL_DIG__=15",
|
||||
"__GCC_ATOMIC_POINTER_LOCK_FREE=2",
|
||||
"__SIZEOF_INT__=4",
|
||||
"__SIZEOF_POINTER__=4",
|
||||
"__GCC_ATOMIC_CHAR16_T_LOCK_FREE=2",
|
||||
"__USER_LABEL_PREFIX__",
|
||||
"__STDC_HOSTED__=1",
|
||||
"__LDBL_HAS_INFINITY__=1",
|
||||
"__XTENSA_EL__=1",
|
||||
"__FLT_EPSILON__=1.1920928955078125e-7F",
|
||||
"__GXX_WEAK__=1",
|
||||
"__LDBL_MIN__=2.2250738585072014e-308L",
|
||||
"__DEC32_MAX__=9.999999E96DF",
|
||||
"__INT32_MAX__=0x7fffffffL",
|
||||
"__SIZEOF_LONG__=4",
|
||||
"__UINT16_C(c)=c",
|
||||
"__DECIMAL_DIG__=17",
|
||||
"__has_include_next(STR)=__has_include_next__(STR)",
|
||||
"__LDBL_HAS_QUIET_NAN__=1",
|
||||
"__GNUC__=5",
|
||||
"__GXX_RTTI=1",
|
||||
"__FLT_HAS_DENORM__=1",
|
||||
"__SIZEOF_LONG_DOUBLE__=8",
|
||||
"__BIGGEST_ALIGNMENT__=16",
|
||||
"__DBL_MAX__=double(1.7976931348623157e+308L)",
|
||||
"__INT_FAST32_MAX__=0x7fffffff",
|
||||
"__DBL_HAS_INFINITY__=1",
|
||||
"__INT64_MAX__=0x7fffffffffffffffLL",
|
||||
"__DEC32_MIN_EXP__=(-94)",
|
||||
"__INT_FAST16_TYPE__=int",
|
||||
"__LDBL_HAS_DENORM__=1",
|
||||
"__cplusplus=199711L",
|
||||
"__DEC128_MAX__=9.999999999999999999999999999999999E6144DL",
|
||||
"__INT_LEAST32_MAX__=0x7fffffffL",
|
||||
"__DEC32_MIN__=1E-95DF",
|
||||
"__DEPRECATED=1",
|
||||
"__DBL_MAX_EXP__=1024",
|
||||
"__DEC128_EPSILON__=1E-33DL",
|
||||
"__PTRDIFF_MAX__=0x7fffffff",
|
||||
"__GNUG__=5",
|
||||
"__LONG_LONG_MAX__=0x7fffffffffffffffLL",
|
||||
"__SIZEOF_SIZE_T__=4",
|
||||
"__SIZEOF_WINT_T__=4",
|
||||
"__GXX_ABI_VERSION=1009",
|
||||
"__FLT_MIN_EXP__=(-125)",
|
||||
"__INT_FAST64_TYPE__=long long int",
|
||||
"__FP_FAST_FMAF=1",
|
||||
"__DBL_MIN__=double(2.2250738585072014e-308L)",
|
||||
"__FLT_MIN_10_EXP__=(-37)",
|
||||
"__DEC128_MIN__=1E-6143DL",
|
||||
"__REGISTER_PREFIX__",
|
||||
"__UINT16_MAX__=0xffff",
|
||||
"__DBL_HAS_DENORM__=1",
|
||||
"__UINT8_TYPE__=unsigned char",
|
||||
"__NO_INLINE__=1",
|
||||
"__FLT_MANT_DIG__=24",
|
||||
"__VERSION__=\"5.2.0\"",
|
||||
"__UINT64_C(c)=c ## ULL",
|
||||
"__GCC_ATOMIC_INT_LOCK_FREE=2",
|
||||
"__FLOAT_WORD_ORDER__=__ORDER_LITTLE_ENDIAN__",
|
||||
"__INT32_C(c)=c ## L",
|
||||
"__DEC64_EPSILON__=1E-15DD",
|
||||
"__ORDER_PDP_ENDIAN__=3412",
|
||||
"__DEC128_MIN_EXP__=(-6142)",
|
||||
"__INT_FAST32_TYPE__=int",
|
||||
"__UINT_LEAST16_TYPE__=short unsigned int",
|
||||
"__INT16_MAX__=0x7fff",
|
||||
"__cpp_rtti=199711",
|
||||
"__SIZE_TYPE__=unsigned int",
|
||||
"__UINT64_MAX__=0xffffffffffffffffULL",
|
||||
"__INT8_TYPE__=signed char",
|
||||
"__ELF__=1",
|
||||
"__xtensa__=1",
|
||||
"__FLT_RADIX__=2",
|
||||
"__INT_LEAST16_TYPE__=short int",
|
||||
"__LDBL_EPSILON__=2.2204460492503131e-16L",
|
||||
"__UINTMAX_C(c)=c ## ULL",
|
||||
"__SIG_ATOMIC_MAX__=0x7fffffff",
|
||||
"__GCC_ATOMIC_WCHAR_T_LOCK_FREE=2",
|
||||
"__SIZEOF_PTRDIFF_T__=4",
|
||||
"__DEC32_SUBNORMAL_MIN__=0.000001E-95DF",
|
||||
"__INT_FAST16_MAX__=0x7fffffff",
|
||||
"__UINT_FAST32_MAX__=0xffffffffU",
|
||||
"__UINT_LEAST64_TYPE__=long long unsigned int",
|
||||
"__FLT_HAS_QUIET_NAN__=1",
|
||||
"__FLT_MAX_10_EXP__=38",
|
||||
"__LONG_MAX__=0x7fffffffL",
|
||||
"__DEC128_SUBNORMAL_MIN__=0.000000000000000000000000000000001E-6143DL",
|
||||
"__FLT_HAS_INFINITY__=1",
|
||||
"__UINT_FAST16_TYPE__=unsigned int",
|
||||
"__DEC64_MAX__=9.999999999999999E384DD",
|
||||
"__CHAR16_TYPE__=short unsigned int",
|
||||
"__PRAGMA_REDEFINE_EXTNAME=1",
|
||||
"__INT_LEAST16_MAX__=0x7fff",
|
||||
"__DEC64_MANT_DIG__=16",
|
||||
"__UINT_LEAST32_MAX__=0xffffffffUL",
|
||||
"__GCC_ATOMIC_LONG_LOCK_FREE=2",
|
||||
"__INT_LEAST64_TYPE__=long long int",
|
||||
"__INT16_TYPE__=short int",
|
||||
"__INT_LEAST8_TYPE__=signed char",
|
||||
"__DEC32_MAX_EXP__=97",
|
||||
"__INT_FAST8_MAX__=0x7fffffff",
|
||||
"__INTPTR_MAX__=0x7fffffff",
|
||||
"__EXCEPTIONS=1",
|
||||
"__LDBL_MANT_DIG__=53",
|
||||
"__DBL_HAS_QUIET_NAN__=1",
|
||||
"__SIG_ATOMIC_MIN__=(-__SIG_ATOMIC_MAX__ - 1)",
|
||||
"__INTPTR_TYPE__=int",
|
||||
"__UINT16_TYPE__=short unsigned int",
|
||||
"__WCHAR_TYPE__=short unsigned int",
|
||||
"__SIZEOF_FLOAT__=4",
|
||||
"__UINTPTR_MAX__=0xffffffffU",
|
||||
"__DEC64_MIN_EXP__=(-382)",
|
||||
"__INT_FAST64_MAX__=0x7fffffffffffffffLL",
|
||||
"__GCC_ATOMIC_TEST_AND_SET_TRUEVAL=1",
|
||||
"__FLT_DIG__=6",
|
||||
"__UINT_FAST64_TYPE__=long long unsigned int",
|
||||
"__INT_MAX__=0x7fffffff",
|
||||
"__INT64_TYPE__=long long int",
|
||||
"__FLT_MAX_EXP__=128",
|
||||
"__DBL_MANT_DIG__=53",
|
||||
"__INT_LEAST64_MAX__=0x7fffffffffffffffLL",
|
||||
"__DEC64_MIN__=1E-383DD",
|
||||
"__WINT_TYPE__=unsigned int",
|
||||
"__UINT_LEAST32_TYPE__=long unsigned int",
|
||||
"__SIZEOF_SHORT__=2",
|
||||
"__LDBL_MIN_EXP__=(-1021)",
|
||||
"__INT_LEAST8_MAX__=0x7f",
|
||||
"__WCHAR_UNSIGNED__=1",
|
||||
"__LDBL_MAX_10_EXP__=308",
|
||||
"__ATOMIC_RELAXED=0",
|
||||
"__DBL_EPSILON__=double(2.2204460492503131e-16L)",
|
||||
"__XTENSA_WINDOWED_ABI__=1",
|
||||
"__UINT8_C(c)=c",
|
||||
"__INT_LEAST32_TYPE__=long int",
|
||||
"__SIZEOF_WCHAR_T__=2",
|
||||
"__UINT64_TYPE__=long long unsigned int",
|
||||
"__INT_FAST8_TYPE__=int",
|
||||
"__DBL_DECIMAL_DIG__=17",
|
||||
"__DEC_EVAL_METHOD__=2",
|
||||
"__XTENSA__=1",
|
||||
"__ORDER_BIG_ENDIAN__=4321",
|
||||
"__cpp_runtime_arrays=198712",
|
||||
"__UINT32_C(c)=c ## UL",
|
||||
"__INTMAX_MAX__=0x7fffffffffffffffLL",
|
||||
"__BYTE_ORDER__=__ORDER_LITTLE_ENDIAN__",
|
||||
"__FLT_DENORM_MIN__=1.4012984643248171e-45F",
|
||||
"__INT8_MAX__=0x7f",
|
||||
"__UINT_FAST32_TYPE__=unsigned int",
|
||||
"__CHAR32_TYPE__=long unsigned int",
|
||||
"__FLT_MAX__=3.4028234663852886e+38F",
|
||||
"__INT32_TYPE__=long int",
|
||||
"__SIZEOF_DOUBLE__=8",
|
||||
"__cpp_exceptions=199711",
|
||||
"__INTMAX_TYPE__=long long int",
|
||||
"__DEC128_MAX_EXP__=6145",
|
||||
"__ATOMIC_CONSUME=1",
|
||||
"__GNUC_MINOR__=2",
|
||||
"__UINTMAX_MAX__=0xffffffffffffffffULL",
|
||||
"__DEC32_MANT_DIG__=7",
|
||||
"__DBL_MAX_10_EXP__=308",
|
||||
"__LDBL_DENORM_MIN__=4.9406564584124654e-324L",
|
||||
"__INT16_C(c)=c",
|
||||
"__STDC__=1",
|
||||
"__PTRDIFF_TYPE__=int",
|
||||
"__ATOMIC_SEQ_CST=5",
|
||||
"__UINT32_TYPE__=long unsigned int",
|
||||
"__UINTPTR_TYPE__=unsigned int",
|
||||
"__DEC64_SUBNORMAL_MIN__=0.000000000000001E-383DD",
|
||||
"__DEC128_MANT_DIG__=34",
|
||||
"__LDBL_MIN_10_EXP__=(-307)",
|
||||
"__SIZEOF_LONG_LONG__=8",
|
||||
"__GCC_ATOMIC_LLONG_LOCK_FREE=1",
|
||||
"__LDBL_DIG__=15",
|
||||
"__FLT_DECIMAL_DIG__=9",
|
||||
"__UINT_FAST16_MAX__=0xffffffffU",
|
||||
"__GNUC_GNU_INLINE__=1",
|
||||
"__GCC_ATOMIC_SHORT_LOCK_FREE=2",
|
||||
"__UINT_FAST8_TYPE__=unsigned int",
|
||||
"__ATOMIC_ACQ_REL=4",
|
||||
"__ATOMIC_RELEASE=3",
|
||||
"USBCON"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
174
Button2.cpp
Normal file
174
Button2.cpp
Normal file
@@ -0,0 +1,174 @@
|
||||
/////////////////////////////////////////////////////////////////
|
||||
/*
|
||||
Button2.cpp - Arduino Library to simplify working with buttons.
|
||||
Created by Lennart Hennigs, October 28, 2017.
|
||||
*/
|
||||
/////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "Arduino.h"
|
||||
#include "Button2.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
|
||||
Button2::Button2(byte attachTo, byte buttonMode /*= INPUT_PULLUP*/, unsigned int debounceTimeout /*= DEBOUNCE_MS*/) {
|
||||
pin = attachTo;
|
||||
setDebounceTime(debounceTimeout);
|
||||
pinMode(attachTo, buttonMode);
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
|
||||
bool Button2::operator==(Button2 &rhs) {
|
||||
return (this==&rhs);
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
|
||||
void Button2::setDebounceTime(unsigned int ms) {
|
||||
debounce_time_ms = ms;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
|
||||
void Button2::setChangedHandler(CallbackFunction f) {
|
||||
change_cb = f;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
|
||||
void Button2::setPressedHandler(CallbackFunction f) {
|
||||
pressed_cb = f;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
|
||||
void Button2::setReleasedHandler(CallbackFunction f) {
|
||||
released_cb = f;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
|
||||
void Button2::setClickHandler(CallbackFunction f) {
|
||||
click_cb = f;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
|
||||
void Button2::setTapHandler(CallbackFunction f) {
|
||||
tap_cb = f;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
|
||||
void Button2::setLongClickHandler(CallbackFunction f) {
|
||||
long_cb = f;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
|
||||
void Button2::setDoubleClickHandler(CallbackFunction f) {
|
||||
double_cb = f;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
|
||||
void Button2::setTripleClickHandler(CallbackFunction f) {
|
||||
triple_cb = f;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
|
||||
unsigned int Button2::wasPressedFor() {
|
||||
return down_time_ms;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
|
||||
boolean Button2::isPressed() {
|
||||
return (state == LOW);
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
|
||||
unsigned int Button2::getNumberOfClicks() {
|
||||
return click_count;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
|
||||
unsigned int Button2::getClickType() {
|
||||
return last_click_type;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
|
||||
void Button2::loop() {
|
||||
if(pin < 0)return;
|
||||
|
||||
prev_state = state;
|
||||
state = digitalRead(pin);
|
||||
|
||||
// is button pressed?
|
||||
if (prev_state == HIGH && state == LOW) {
|
||||
down_ms = millis();
|
||||
pressed_triggered = false;
|
||||
click_count++;
|
||||
click_ms = down_ms;
|
||||
|
||||
// is the button released?
|
||||
} else if (prev_state == LOW && state == HIGH) {
|
||||
down_time_ms = millis() - down_ms;
|
||||
// is it beyond debounce time?
|
||||
if (down_time_ms >= debounce_time_ms) {
|
||||
// trigger release
|
||||
if (change_cb != NULL) change_cb (*this);
|
||||
if (released_cb != NULL) released_cb (*this);
|
||||
// trigger tap
|
||||
if (tap_cb != NULL) tap_cb (*this);
|
||||
// was it a longclick? (preceeds single / double / triple clicks)
|
||||
if (down_time_ms >= LONGCLICK_MS) {
|
||||
longclick_detected = true;
|
||||
}
|
||||
}
|
||||
|
||||
// trigger pressed event (after debounce has passed)
|
||||
} else if (state == LOW && !pressed_triggered && (millis() - down_ms >= debounce_time_ms)) {
|
||||
if (change_cb != NULL) change_cb (*this);
|
||||
if (pressed_cb != NULL) pressed_cb (*this);
|
||||
pressed_triggered = true;
|
||||
|
||||
// is the button pressed and the time has passed for multiple clicks?
|
||||
} else if (state == HIGH && millis() - click_ms > DOUBLECLICK_MS) {
|
||||
// was there a longclick?
|
||||
if (longclick_detected) {
|
||||
// was it part of a combination?
|
||||
if (click_count == 1) {
|
||||
last_click_type = LONG_CLICK;
|
||||
if (long_cb != NULL) long_cb (*this);
|
||||
}
|
||||
longclick_detected = false;
|
||||
// determine the number of single clicks
|
||||
} else if (click_count > 0) {
|
||||
switch (click_count) {
|
||||
case 1:
|
||||
last_click_type = SINGLE_CLICK;
|
||||
if (click_cb != NULL){
|
||||
click_cb (*this);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
last_click_type = DOUBLE_CLICK;
|
||||
if (double_cb != NULL) double_cb (*this);
|
||||
break;
|
||||
case 3:
|
||||
last_click_type = TRIPLE_CLICK;
|
||||
if (triple_cb != NULL) triple_cb (*this);
|
||||
break;
|
||||
}
|
||||
}
|
||||
click_count = 0;
|
||||
click_ms = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
80
Button2.h
Normal file
80
Button2.h
Normal file
@@ -0,0 +1,80 @@
|
||||
/////////////////////////////////////////////////////////////////
|
||||
/*
|
||||
Button2.cpp - Arduino Library to simplify working with buttons.
|
||||
Created by Lennart Hennigs, October 28, 2017.
|
||||
*/
|
||||
/////////////////////////////////////////////////////////////////
|
||||
#pragma once
|
||||
|
||||
#ifndef Button2_h
|
||||
#define Button2_h
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "Arduino.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
|
||||
#define DEBOUNCE_MS 50
|
||||
#define LONGCLICK_MS 250
|
||||
#define DOUBLECLICK_MS 400
|
||||
|
||||
#define SINGLE_CLICK 1
|
||||
#define DOUBLE_CLICK 2
|
||||
#define TRIPLE_CLICK 3
|
||||
#define LONG_CLICK 4
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
|
||||
class Button2 {
|
||||
private:
|
||||
byte pin;
|
||||
int prev_state;
|
||||
int state = HIGH;
|
||||
byte click_count = 0;
|
||||
unsigned int last_click_type = 0;
|
||||
unsigned long click_ms;
|
||||
unsigned long down_ms;
|
||||
unsigned int debounce_time_ms;
|
||||
unsigned int down_time_ms = 0;
|
||||
bool pressed_triggered = false;
|
||||
bool longclick_detected = false;
|
||||
|
||||
typedef void (*CallbackFunction) (Button2&);
|
||||
|
||||
CallbackFunction pressed_cb = NULL;
|
||||
CallbackFunction released_cb = NULL;
|
||||
CallbackFunction change_cb = NULL;
|
||||
CallbackFunction tap_cb = NULL;
|
||||
CallbackFunction click_cb = NULL;
|
||||
CallbackFunction long_cb = NULL;
|
||||
CallbackFunction double_cb = NULL;
|
||||
CallbackFunction triple_cb = NULL;
|
||||
|
||||
public:
|
||||
Button2(){pin = -1;}
|
||||
Button2(byte attachTo, byte buttonMode = INPUT_PULLUP, unsigned int debounceTimeout = DEBOUNCE_MS);
|
||||
void setDebounceTime(unsigned int ms);
|
||||
|
||||
void setChangedHandler(CallbackFunction f);
|
||||
void setPressedHandler(CallbackFunction f);
|
||||
void setReleasedHandler(CallbackFunction f);
|
||||
void setClickHandler(CallbackFunction f);
|
||||
void setTapHandler(CallbackFunction f);
|
||||
void setLongClickHandler(CallbackFunction f);
|
||||
void setDoubleClickHandler(CallbackFunction f);
|
||||
void setTripleClickHandler(CallbackFunction f);
|
||||
|
||||
unsigned int wasPressedFor();
|
||||
boolean isPressed();
|
||||
|
||||
unsigned int getNumberOfClicks();
|
||||
unsigned int getClickType();
|
||||
uint8_t getAttachPin(){return pin;}
|
||||
bool operator==(Button2 &rhs);
|
||||
|
||||
void loop();
|
||||
};
|
||||
/////////////////////////////////////////////////////////////////
|
||||
#endif
|
||||
/////////////////////////////////////////////////////////////////
|
||||
171
dnddice.ino
Normal file
171
dnddice.ino
Normal file
@@ -0,0 +1,171 @@
|
||||
#include <TFT_eSPI.h>
|
||||
#include "esp_adc_cal.h"
|
||||
#include "Button2.h"
|
||||
#include "dndlogo.h"
|
||||
|
||||
#define ADC_EN 14 //ADC_EN is the ADC detection enable port
|
||||
#define ADC_PIN 34
|
||||
#define BUTTON_1 35
|
||||
#define BUTTON_2 0
|
||||
|
||||
TFT_eSPI tft = TFT_eSPI(); // Invoke custom library
|
||||
Button2 btn1(BUTTON_1);
|
||||
Button2 btn2(BUTTON_2);
|
||||
|
||||
// MENU
|
||||
byte menuItems[] = {20, 12, 10, 8, 6, 4, 3, 2};
|
||||
byte menuPosition = 0;
|
||||
int num_items = sizeof(menuItems) / sizeof(byte);
|
||||
|
||||
String temp;
|
||||
char currentPrintOut[10];
|
||||
int vref = 1100;
|
||||
|
||||
bool showing = false;
|
||||
byte showingDuration = 2;
|
||||
unsigned long lastPush = 0;
|
||||
|
||||
void setup()
|
||||
{
|
||||
randomSeed(analogRead(1));
|
||||
Serial.begin(115200);
|
||||
button_init();
|
||||
|
||||
tft.init();
|
||||
tft.setRotation(1);
|
||||
tft.fillScreen(TFT_BLACK);
|
||||
tft.setSwapBytes(true);
|
||||
tft.pushImage(0, 0, 240, 135, dndlogo);
|
||||
tft.setSwapBytes(false);
|
||||
espDelay(1000);
|
||||
|
||||
drawMenu();
|
||||
}
|
||||
|
||||
void showVoltage()
|
||||
{
|
||||
static uint64_t timeStamp = 0;
|
||||
if (millis() - timeStamp > 1000)
|
||||
{
|
||||
timeStamp = millis();
|
||||
uint16_t v = analogRead(ADC_PIN);
|
||||
float battery_voltage = ((float)v / 4095.0) * 2.0 * 3.3 * (vref / 1000.0);
|
||||
String voltage = "Voltage :" + String(battery_voltage) + "V";
|
||||
Serial.println(voltage);
|
||||
//tft.fillScreen(TFT_BLACK);
|
||||
tft.setTextDatum(BL_DATUM);
|
||||
tft.drawString(voltage, tft.width() / 1.5, tft.height());
|
||||
}
|
||||
}
|
||||
|
||||
void throwDice()
|
||||
{
|
||||
int dice = menuItems[menuPosition];
|
||||
int number = random(dice) + 1;
|
||||
tft.setTextPadding(tft.width());
|
||||
tft.setTextDatum(BL_DATUM);
|
||||
tft.drawString(String(number), tft.width() / 1.5, tft.height());
|
||||
}
|
||||
|
||||
void drawMenu()
|
||||
{
|
||||
tft.fillScreen(TFT_BLACK);
|
||||
tft.setTextColor(TFT_WHITE, TFT_BLACK);
|
||||
tft.setTextSize(2);
|
||||
tft.drawRect(0, 20, TFT_HEIGHT, 1, TFT_WHITE);
|
||||
|
||||
int boxWidth = round(tft.width() / num_items);
|
||||
|
||||
for (int i = 1; i <= num_items; i++)
|
||||
{
|
||||
tft.drawFastVLine(i * boxWidth, 0, 20, TFT_WHITE);
|
||||
tft.setTextColor(TFT_WHITE, TFT_BLACK);
|
||||
tft.setTextSize(2);
|
||||
tft.setTextDatum(MC_DATUM);
|
||||
tft.setTextPadding(0);
|
||||
temp = String(menuItems[i - 1]);
|
||||
temp.toCharArray(currentPrintOut, 10);
|
||||
tft.drawString(currentPrintOut, (i * boxWidth) - (boxWidth / 2), 10);
|
||||
}
|
||||
|
||||
drawSelectedMenu();
|
||||
}
|
||||
|
||||
void drawSelectedMenu()
|
||||
{
|
||||
int boxWidth = round(tft.width() / num_items);
|
||||
|
||||
tft.drawRect(menuPosition * boxWidth, 0, boxWidth, 20, TFT_WHITE);
|
||||
tft.fillRect(menuPosition * boxWidth, 0, boxWidth, 20, TFT_WHITE);
|
||||
|
||||
tft.setTextColor(TFT_BLACK, TFT_WHITE);
|
||||
tft.setTextDatum(MC_DATUM);
|
||||
tft.setTextPadding(0);
|
||||
temp = String(menuItems[menuPosition]);
|
||||
temp.toCharArray(currentPrintOut, 10);
|
||||
tft.drawString(currentPrintOut, ((menuPosition + 1) * boxWidth) - (boxWidth / 2), 10);
|
||||
}
|
||||
|
||||
void drawSelectedDice()
|
||||
{
|
||||
tft.setTextColor(TFT_WHITE, TFT_BLACK);
|
||||
tft.setTextSize(6);
|
||||
tft.setTextDatum(MC_DATUM);
|
||||
tft.setTextPadding(tft.height());
|
||||
temp = "D";
|
||||
temp += String(menuItems[menuPosition]);
|
||||
temp.toCharArray(currentPrintOut, 10);
|
||||
tft.drawString(currentPrintOut, tft.width() / 2, tft.height() / 2);
|
||||
}
|
||||
|
||||
void clearScreen()
|
||||
{
|
||||
tft.fillScreen(TFT_BLACK);
|
||||
drawMenu();
|
||||
}
|
||||
|
||||
void loop()
|
||||
{
|
||||
button_loop();
|
||||
}
|
||||
|
||||
void button_init()
|
||||
{
|
||||
// btn1.setLongClickHandler([](Button2 &b)
|
||||
// {
|
||||
// tft.setSwapBytes(true);
|
||||
// tft.pushImage(0, 0, 240, 135, arne);
|
||||
// tft.setSwapBytes(false);
|
||||
// espDelay(1000);
|
||||
// clearScreen();
|
||||
// drawMenu();
|
||||
// });
|
||||
btn1.setPressedHandler([](Button2 &b)
|
||||
{
|
||||
throwDice();
|
||||
espDelay(1000);
|
||||
});
|
||||
|
||||
btn2.setPressedHandler([](Button2 &b)
|
||||
{
|
||||
menuPosition++;
|
||||
menuPosition = menuPosition++ % num_items;
|
||||
drawMenu();
|
||||
drawSelectedDice();
|
||||
espDelay(1000);
|
||||
clearScreen();
|
||||
});
|
||||
}
|
||||
|
||||
void button_loop()
|
||||
{
|
||||
btn1.loop();
|
||||
btn2.loop();
|
||||
}
|
||||
|
||||
void espDelay(int ms)
|
||||
{
|
||||
esp_sleep_enable_timer_wakeup(ms * 1000);
|
||||
esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_OPTION_ON);
|
||||
esp_light_sleep_start();
|
||||
}
|
||||
Reference in New Issue
Block a user