Fix compilation errors and project dependencies for Arduino Mega

This commit is contained in:
Mykhailo Khulap
2018-10-17 12:13:07 +03:00
parent d89dfd2364
commit 766cd060b8
3 changed files with 237 additions and 235 deletions

View File

@@ -20,6 +20,7 @@ e-mail anklimov@gmail.com
#include "inputs.h"
#include "item.h"
#include "utils.h"
#include <PubSubClient.h>
#ifndef DHT_DISABLE

View File

@@ -477,8 +477,8 @@ void onInitialStateInitLAN() {
#if defined(__AVR__) || defined(__SAM3X8E__)||defined(ARDUINO_ARCH_STM32F1)
#ifdef W5500_CS_PIN
Ethernet.w5500_cspin = W5500_CS_PIN;
debugSerial<<F("Use W5500 pin: "));
debugSerial<<Ethernet.w5500_cspin);
debugSerial<<"Use W5500 pin: ";
debugSerial<<(Ethernet.w5500_cspin);
#endif
IPAddress ip, dns, gw, mask;
int res = 1;
@@ -553,8 +553,8 @@ void softRebootFunc(){
void resetHard() {
#ifdef RESET_PIN
debugSerial<<F("Reset Arduino with digital pin "));
debugSerial<<QUOTE(RESET_PIN));
debugSerial<<"Reset Arduino with digital pin ";
debugSerial<<QUOTE(RESET_PIN);
delay(500);
pinMode(RESET_PIN, OUTPUT);
digitalWrite(RESET_PIN,LOW);
@@ -1182,7 +1182,7 @@ void printFirmwareVersionAndBuildOptions() {
#endif
#ifdef RESET_PIN
debugSerial<<F("\n(+)HARDRESET on pin=")<<F(QUOTE(RESET_PIN);
debugSerial<<"\n(+)HARDRESET on pin="<<QUOTE(RESET_PIN);
#else
debugSerial<<F("\n(-)HARDRESET, using soft");
#endif

View File

@@ -1,230 +1,231 @@
; PlatformIO Project Configuration File (for copy and paste)
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; http://docs.platformio.org/page/projectconf.html
[platformio]
src_dir = lighthub
env_default =
; megaatmega2560
megaatmega2560-net
; due
; esp8266
; esp32
; megaatmega2560-5500
; due-5500
; controllino
; stm32
;build_dir = !sh pioenvs.sh ${platformio.env_default}
;libdeps_dir = !sh piolibdeps.sh ${platformio.env_default}
[env:esp32]
platform = espressif32
framework = arduino
board = pico32
lib_ldf_mode = chain+
build_flags = !sh build_flags_esp32.sh
lib_deps =
https://github.com/anklimov/Arduino-Temperature-Control-Library.git
https://github.com/anklimov/DS2482_OneWire
ESP8266HTTPClient
Ethernet3
https://github.com/anklimov/aJson
https://github.com/anklimov/CmdArduino
https://github.com/anklimov/ModbusMaster
https://github.com/knolleary/pubsubclient.git
https://github.com/anklimov/Artnet.git
FastLED
Adafruit Unified Sensor
DHT sensor library for ESPx
DHT sensor library
Streaming
https://github.com/Chris--A/PrintEx.git
[env:stm32]
platform = ststm32
framework = arduino
board = nucleo_f103rb
upload_protocol = stlink
debug_tool = stlink
extra_scripts = pre:!pre_stm32.sh
;lib_ldf_mode = chain+
build_flags = !sh build_flags_stm32.sh
lib_deps =
DallasTemperature
https://github.com/anklimov/aJson
https://github.com/anklimov/CmdArduino
ArduinoHttpClient
https://github.com/anklimov/ModbusMaster
; https://github.com/Serasidis/Ethernet_STM.git
; https://github.com/livello/Ethernet_STM.git
https://github.com/knolleary/pubsubclient.git
Adafruit Unified Sensor
DHT sensor library
; https://github.com/anklimov/DMXSerial
; Syslog
; https://github.com/No3x/Syslog.git
https://github.com/arcao/Syslog.git
; UIPEthernet
[env:due]
platform = atmelsam
framework = arduino
board = due
lib_ldf_mode = chain+
build_flags = !sh build_flags_due.sh
lib_deps =
https://github.com/sebnil/DueFlashStorage
https://github.com/anklimov/Arduino-Temperature-Control-Library.git
https://github.com/anklimov/DS2482_OneWire
https://github.com/anklimov/DmxDue
https://github.com/anklimov/ArduinoHttpClient
https://github.com/anklimov/aJson
https://github.com/anklimov/CmdArduino
https://github.com/anklimov/ModbusMaster
https://github.com/anklimov/Ethernet
https://github.com/knolleary/pubsubclient.git
https://github.com/anklimov/Artnet.git
FastLED
SD
SdFat
Adafruit Unified Sensor
DHT sensor library
https://github.com/arcao/Syslog.git
[env:megaatmega2560]
platform = atmelavr
board = megaatmega2560
;upload_port = net:192.168.88.31:23
framework = arduino
;lib_ldf_mode = chain+
build_flags = !sh build_flags_mega2560.sh
lib_deps =
https://github.com/anklimov/DmxSimple
https://github.com/anklimov/httpClient
https://github.com/anklimov/aJson
https://github.com/anklimov/CmdArduino
https://github.com/anklimov/ModbusMaster
https://github.com/anklimov/DMXSerial
https://github.com/anklimov/Ethernet
https://github.com/PaulStoffregen/SPI.git
https://github.com/knolleary/pubsubclient.git
https://github.com/anklimov/Artnet.git
FastLED
EEPROM
Adafruit Unified Sensor
DHT sensor library
https://github.com/arcao/Syslog.git
Streaming
[env:esp8266]
platform = espressif8266
framework = arduino
board = nodemcuv2
lib_ldf_mode = chain+
build_flags = !sh build_flags_esp8266.sh
lib_deps =
https://github.com/anklimov/Arduino-Temperature-Control-Library.git
https://github.com/anklimov/DS2482_OneWire
https://github.com/anklimov/ESP-Dmx
ESP8266HTTPClient
https://github.com/anklimov/aJson
https://github.com/anklimov/CmdArduino
https://github.com/anklimov/ModbusMaster
https://github.com/knolleary/pubsubclient.git
https://github.com/anklimov/Artnet.git
FastLED
Adafruit Unified Sensor
DHT sensor library for ESPx
DHT sensor library
WifiManager
https://github.com/arcao/Syslog.git
https://github.com/livello/PrintEx.git#is-select-redecl
Streaming
[env:megaatmega2560-net]
platform = atmelavr
board = megaatmega2560
framework = arduino
upload_port = net:192.168.88.2:23000
build_flags = !sh build_flags_mega2560-net.sh
;lib_ldf_mode = chain+
lib_deps =
https://github.com/anklimov/Arduino-Temperature-Control-Library.git
https://github.com/anklimov/DS2482_OneWire
https://github.com/anklimov/DmxSimple
https://github.com/anklimov/httpClient
https://github.com/anklimov/aJson
https://github.com/anklimov/CmdArduino
https://github.com/anklimov/ModbusMaster
https://github.com/anklimov/DMXSerial
https://github.com/anklimov/Ethernet
https://github.com/PaulStoffregen/SPI.git
https://github.com/knolleary/pubsubclient.git
https://github.com/anklimov/Artnet.git
FastLED
Adafruit Unified Sensor
DHT sensor library
https://github.com/arcao/Syslog.git
Streaming
[env:due-5500]
platform = atmelsam
framework = arduino
board = due
;lib_ldf_mode = chain+
build_flags = -D Wiz5500 -D ARTNET_ENABLE
build_flags = !sh build_flags_due-5500.sh
lib_deps =
https://github.com/sebnil/DueFlashStorage
https://github.com/anklimov/Arduino-Temperature-Control-Library.git
https://github.com/anklimov/DS2482_OneWire
https://github.com/anklimov/DmxDue
https://github.com/anklimov/ArduinoHttpClient
https://github.com/anklimov/aJson
https://github.com/anklimov/CmdArduino
https://github.com/anklimov/ModbusMaster
https://github.com/anklimov/Ethernet2
https://github.com/knolleary/pubsubclient.git
https://github.com/anklimov/Artnet.git
FastLED
SD
SdFat
Adafruit Unified Sensor
DHT sensor library
https://github.com/arcao/Syslog.git
Streaming
; PrintEx
https://github.com/livello/PrintEx.git#is-select-redecl
[env:controllino]
platform = atmelavr
board = megaatmega2560
framework = arduino
;lib_ldf_mode = chain+
build_flags = !echo -n "-DPIO_SRC_REV="$(git log --pretty=format:%h_%ad -1 --date=short)
build_flags = -D CONTROLLINO -D CUSTOM_FIRMWARE_MAC=de:ad:be:ef:fe:07
lib_deps =
https://github.com/anklimov/Arduino-Temperature-Control-Library.git
https://github.com/anklimov/DS2482_OneWire
https://github.com/anklimov/DmxSimple
https://github.com/anklimov/httpClient
https://github.com/anklimov/aJson
https://github.com/anklimov/CmdArduino
https://github.com/anklimov/ModbusMaster
https://github.com/anklimov/DMXSerial
https://github.com/anklimov/Ethernet
https://github.com/PaulStoffregen/SPI.git
https://github.com/knolleary/pubsubclient.git
https://github.com/anklimov/Artnet.git
FastLED
EEPROM
Adafruit Unified Sensor
DHT sensor library
; PlatformIO Project Configuration File (for copy and paste)
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; http://docs.platformio.org/page/projectconf.html
[platformio]
src_dir = lighthub
env_default =
megaatmega2560
; megaatmega2560-net
; due
; esp8266
; esp32
; megaatmega2560-5500
; due-5500
; controllino
; stm32
;build_dir = !sh pioenvs.sh ${platformio.env_default}
;libdeps_dir = !sh piolibdeps.sh ${platformio.env_default}
[env:esp32]
platform = espressif32
framework = arduino
board = pico32
lib_ldf_mode = chain+
build_flags = !sh build_flags_esp32.sh
lib_deps =
https://github.com/anklimov/Arduino-Temperature-Control-Library.git
https://github.com/anklimov/DS2482_OneWire
ESP8266HTTPClient
Ethernet3
https://github.com/anklimov/aJson
https://github.com/anklimov/CmdArduino
https://github.com/anklimov/ModbusMaster
https://github.com/knolleary/pubsubclient.git
https://github.com/anklimov/Artnet.git
FastLED
Adafruit Unified Sensor
DHT sensor library for ESPx
DHT sensor library
Streaming
https://github.com/Chris--A/PrintEx.git
[env:stm32]
platform = ststm32
framework = arduino
board = nucleo_f103rb
upload_protocol = stlink
debug_tool = stlink
extra_scripts = pre:!pre_stm32.sh
;lib_ldf_mode = chain+
build_flags = !sh build_flags_stm32.sh
lib_deps =
DallasTemperature
https://github.com/anklimov/aJson
https://github.com/anklimov/CmdArduino
ArduinoHttpClient
https://github.com/anklimov/ModbusMaster
; https://github.com/Serasidis/Ethernet_STM.git
; https://github.com/livello/Ethernet_STM.git
https://github.com/knolleary/pubsubclient.git
Adafruit Unified Sensor
DHT sensor library
; https://github.com/anklimov/DMXSerial
; Syslog
; https://github.com/No3x/Syslog.git
https://github.com/arcao/Syslog.git
; UIPEthernet
[env:due]
platform = atmelsam
framework = arduino
board = due
lib_ldf_mode = chain+
build_flags = !sh build_flags_due.sh
lib_deps =
https://github.com/sebnil/DueFlashStorage
https://github.com/anklimov/Arduino-Temperature-Control-Library.git
https://github.com/anklimov/DS2482_OneWire
https://github.com/anklimov/DmxDue
https://github.com/anklimov/ArduinoHttpClient
https://github.com/anklimov/aJson
https://github.com/anklimov/CmdArduino
https://github.com/anklimov/ModbusMaster
https://github.com/anklimov/Ethernet
https://github.com/knolleary/pubsubclient.git
https://github.com/anklimov/Artnet.git
FastLED
SD
SdFat
Adafruit Unified Sensor
DHT sensor library
https://github.com/arcao/Syslog.git
[env:megaatmega2560]
platform = atmelavr
board = megaatmega2560
;upload_port = net:192.168.88.31:23
framework = arduino
;lib_ldf_mode = chain+
build_flags = !sh build_flags_mega2560.sh
lib_deps =
https://github.com/anklimov/DmxSimple
https://github.com/anklimov/httpClient
https://github.com/anklimov/aJson
https://github.com/anklimov/CmdArduino
https://github.com/anklimov/ModbusMaster
https://github.com/anklimov/DMXSerial
https://github.com/anklimov/Ethernet2
https://github.com/PaulStoffregen/SPI.git
https://github.com/knolleary/pubsubclient.git
https://github.com/anklimov/Artnet.git
FastLED
EEPROM
Adafruit Unified Sensor
DHT sensor library
https://github.com/arcao/Syslog.git
Streaming
https://github.com/Chris--A/PrintEx.git
[env:esp8266]
platform = espressif8266
framework = arduino
board = nodemcuv2
lib_ldf_mode = chain+
build_flags = !sh build_flags_esp8266.sh
lib_deps =
https://github.com/anklimov/Arduino-Temperature-Control-Library.git
https://github.com/anklimov/DS2482_OneWire
https://github.com/anklimov/ESP-Dmx
ESP8266HTTPClient
https://github.com/anklimov/aJson
https://github.com/anklimov/CmdArduino
https://github.com/anklimov/ModbusMaster
https://github.com/knolleary/pubsubclient.git
https://github.com/anklimov/Artnet.git
FastLED
Adafruit Unified Sensor
DHT sensor library for ESPx
DHT sensor library
WifiManager
https://github.com/arcao/Syslog.git
https://github.com/livello/PrintEx.git#is-select-redecl
Streaming
[env:megaatmega2560-net]
platform = atmelavr
board = megaatmega2560
framework = arduino
upload_port = net:192.168.88.2:23000
build_flags = !sh build_flags_mega2560-net.sh
;lib_ldf_mode = chain+
lib_deps =
https://github.com/anklimov/Arduino-Temperature-Control-Library.git
https://github.com/anklimov/DS2482_OneWire
https://github.com/anklimov/DmxSimple
https://github.com/anklimov/httpClient
https://github.com/anklimov/aJson
https://github.com/anklimov/CmdArduino
https://github.com/anklimov/ModbusMaster
https://github.com/anklimov/DMXSerial
https://github.com/anklimov/Ethernet
https://github.com/PaulStoffregen/SPI.git
https://github.com/knolleary/pubsubclient.git
https://github.com/anklimov/Artnet.git
FastLED
Adafruit Unified Sensor
DHT sensor library
https://github.com/arcao/Syslog.git
Streaming
[env:due-5500]
platform = atmelsam
framework = arduino
board = due
;lib_ldf_mode = chain+
build_flags = -D Wiz5500 -D ARTNET_ENABLE
build_flags = !sh build_flags_due-5500.sh
lib_deps =
https://github.com/sebnil/DueFlashStorage
https://github.com/anklimov/Arduino-Temperature-Control-Library.git
https://github.com/anklimov/DS2482_OneWire
https://github.com/anklimov/DmxDue
https://github.com/anklimov/ArduinoHttpClient
https://github.com/anklimov/aJson
https://github.com/anklimov/CmdArduino
https://github.com/anklimov/ModbusMaster
https://github.com/anklimov/Ethernet2
https://github.com/knolleary/pubsubclient.git
https://github.com/anklimov/Artnet.git
FastLED
SD
SdFat
Adafruit Unified Sensor
DHT sensor library
https://github.com/arcao/Syslog.git
Streaming
; PrintEx
https://github.com/livello/PrintEx.git#is-select-redecl
[env:controllino]
platform = atmelavr
board = megaatmega2560
framework = arduino
;lib_ldf_mode = chain+
build_flags = !echo -n "-DPIO_SRC_REV="$(git log --pretty=format:%h_%ad -1 --date=short)
build_flags = -D CONTROLLINO -D CUSTOM_FIRMWARE_MAC=de:ad:be:ef:fe:07
lib_deps =
https://github.com/anklimov/Arduino-Temperature-Control-Library.git
https://github.com/anklimov/DS2482_OneWire
https://github.com/anklimov/DmxSimple
https://github.com/anklimov/httpClient
https://github.com/anklimov/aJson
https://github.com/anklimov/CmdArduino
https://github.com/anklimov/ModbusMaster
https://github.com/anklimov/DMXSerial
https://github.com/anklimov/Ethernet
https://github.com/PaulStoffregen/SPI.git
https://github.com/knolleary/pubsubclient.git
https://github.com/anklimov/Artnet.git
FastLED
EEPROM
Adafruit Unified Sensor
DHT sensor library