Skip to content

Commit

Permalink
Bump dependencies to last version (induced some refactoring)
Browse files Browse the repository at this point in the history
  • Loading branch information
CosmicMac committed Dec 20, 2020
1 parent 77ad668 commit 705aa68
Show file tree
Hide file tree
Showing 4 changed files with 132 additions and 104 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@
.vscode/extensions.json
src/config.h
clean.bat
config.h
*.bak
27 changes: 15 additions & 12 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,25 @@
; http://docs.platformio.org/page/projectconf.html

[env:d1_mini]
platform = espressif8266@2.4.0
platform = espressif8266@2.6.2
framework = arduino

board = d1_mini
lib_ldf_mode = deep+
board_build.f_cpu = 160000000L

build_flags =
-DARDUINOJSON_ENABLE_PROGMEM=1
-DMQTT_MAX_PACKET_SIZE=1024
framework = arduino
-D ARDUINOJSON_ENABLE_PROGMEM=1

lib_deps =
earlephilhower/ESP8266Audio @ 1.7
jrowberg/I2Cdevlib-MPU6050 @ 0.0.0-alpha+sha.fbde122cc5
fastled/FastLED @ 3.3.3
me-no-dev/ESP Async WebServer @ 1.2.3
knolleary/PubSubClient @ 2.8
bblanchon/ArduinoJson @ 6.17.2
lib_ldf_mode = deep+

upload_speed = 921600
; Uncomment the 2 lines below after 1st firmware upload, to activate OTA
;upload_protocol = espota
;upload_port = esparkle.local
lib_deps =
ESP8266Audio@1.2
I2Cdevlib-MPU6050@fbde122cc5
FastLED@3.3.3
ESP Async WebServer@1.2.3
PubSubClient@2.7
ArduinoJson@5.13.4
39 changes: 26 additions & 13 deletions src/config.h.SAMPLE
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,18 @@
//############################################################################
// ESPARKLE VERSION
//############################################################################
#define ESPARKLE_VERSION "1.0"

#define ESPARKLE_VERSION "1.1"

//############################################################################
// WIFI
//############################################################################
#define ESP_NAME "ESParkle" // ESP8266 host name

const WifiAPEntry AP_LIST[] = { // Access points list
// ESP8266 host name
#define ESP_NAME "ESParkle"

// Access points list
const WifiAPEntry AP_LIST[] = {
{"YOUR_SSID_1", "YOUR_PASSPHRASE_1"},
{"YOUR_SSID_2", "YOUR_PASSPHRASE_2"},
{"YOUR_SSID_3", "YOUR_PASSPHRASE_3"}
Expand All @@ -20,43 +24,52 @@ const WifiAPEntry AP_LIST[] = {
//############################################################################
// MQTT
//############################################################################

#define MQTT_HOST "mXX.cloudmqtt.com"
#define MQTT_PORT 12345
#define MQTT_USER "YOUR_MQTT_USER"
#define MQTT_PASSWORD "YOUR_MQTT_PASSWORD"
#define MQTT_IN_TOPIC "esparkle/in"
#define MQTT_OUT_TOPIC "esparkle/out"
#define MQTT_BUFF_SIZE 1024

//############################################################################
// AUDIO
//############################################################################
#define RANDOM_STREAM_URL "http://www.dummyhost.net/esparkle/esparkle_mp3.php?action=random" // URL of companion PHP script for random MP3
#define TTS_PROXY_URL "http://www.dummyhost.net/esparkle/esparkle_tts.php" // URL of companion PHP script for TTS
#define TTS_PROXY_USER "YOUR_TTS_PROXY_USER" // HTTP Basic authentication user name for TTS
#define TTS_PROXY_PASSWORD "YOUR_TTS_PROXY_PASSWORD" // HTTP Basic authentication password for TTS

float defaultGain = .3;
#define RANDOM_STREAM_URL "http://www.dummyhost.net/esparkle/esparkle_mp3.php?action=random" // URL of companion PHP script for random MP3
#define TTS_PROXY_URL "http://www.dummyhost.net/esparkle/esparkle_tts.php" // URL of companion PHP script for TTS
#define TTS_PROXY_USER "YOUR_TTS_PROXY_USER" // HTTP Basic authentication user name for TTS
#define TTS_PROXY_PASSWORD "YOUR_TTS_PROXY_PASSWORD" // HTTP Basic authentication password for TTS

float defaultGain = .3;

//############################################################################
// LED
//############################################################################
#define COLOR_ORDER GRB // Set GRB for WS2812B and GBR for APA102
#define LED_TYPE WS2812B // APA102, WS2801 or WS2812B
#define NUM_LEDS 3 // Number of LEDs
uint8_t max_bright = 128; // Default overall brightness

#define COLOR_ORDER GRB // Set GRB for WS2812B and GBR for APA102
#define LED_TYPE WS2812B // APA102, WS2801 or WS2812B
#define NUM_LEDS 7 // Number of LEDs
uint8_t max_bright = 128; // Default overall brightness

//############################################################################
// MPU
//############################################################################

// MPU sensitivity params
#define MPU_INTERRUPT_INTERVAL_MS 750
#define MPU_MULTITAP_INTERVAL_MS 2000
#define MPU_MULTITAP_RESTART 5
#define MOTION_DETECTION_THRESHOLD 10
#define MOTION_DETECTION_DURATION 5

// Number of taps to trigger ESP restart
#define MPU_MULTITAP_RESTART 5

//############################################################################
// PINS
//############################################################################

/* --------+--------------+--------------------------------
* D1 pin ESP-8266 pin Function
* --------+--------------+--------------------------------
Expand Down
Loading

0 comments on commit 705aa68

Please sign in to comment.