First sucsessfull working build on NRF52840+Wiznet5500

This commit is contained in:
2019-05-12 18:09:39 +03:00
parent dc4215deaf
commit 1303c106b5
4 changed files with 13 additions and 7 deletions

View File

@@ -245,7 +245,10 @@ dmxout.begin();
dmxout.setTxMaxChannels(channels); dmxout.setTxMaxChannels(channels);
#endif #endif
#endif #endif
#ifndef DMX_DISABLE
for (int i=1;i<=channels;i++) DmxWrite(i,0); for (int i=1;i<=channels;i++) DmxWrite(i,0);
#endif
} }
void ArtnetSetup() void ArtnetSetup()

View File

@@ -361,7 +361,7 @@ if (WiFi.status() != WL_CONNECTED)
} }
#endif #endif
#if defined(ARDUINO_ARCH_AVR) || defined(__SAM3X8E__) #if defined(ARDUINO_ARCH_AVR) || defined(__SAM3X8E__) || defined (NRF5)
wdt_dis(); wdt_dis();
if (lanStatus > 0) if (lanStatus > 0)
switch (Ethernet.maintain()) { switch (Ethernet.maintain()) {
@@ -687,7 +687,7 @@ wifiManager.setTimeout(30);
} }
#endif #endif
#if defined(ARDUINO_ARCH_AVR) || defined(__SAM3X8E__)||defined(ARDUINO_ARCH_STM32) #if defined(ARDUINO_ARCH_AVR) || defined(__SAM3X8E__)||defined(ARDUINO_ARCH_STM32) || defined (NRF5)
#ifdef W5500_CS_PIN #ifdef W5500_CS_PIN
Ethernet.w5500_cspin = W5500_CS_PIN; Ethernet.w5500_cspin = W5500_CS_PIN;
debugSerial<<F("Use W5500 pin: "); debugSerial<<F("Use W5500 pin: ");
@@ -718,7 +718,7 @@ wifiManager.setTimeout(30);
else { else {
debugSerial<<"\nNo IP data found in flash\n"; debugSerial<<"\nNo IP data found in flash\n";
wdt_dis(); wdt_dis();
#if defined(ARDUINO_ARCH_AVR) || defined(__SAM3X8E__) #if defined(ARDUINO_ARCH_AVR) || defined(__SAM3X8E__) || defined (NRF5)
res = Ethernet.begin(mac, 12000); res = Ethernet.begin(mac, 12000);
#endif #endif
#if defined(ARDUINO_ARCH_STM32) #if defined(ARDUINO_ARCH_STM32)
@@ -1220,7 +1220,7 @@ lan_status loadConfigFromHttp(int arg_cnt, char **args)
return READ_RE_CONFIG;//-11; return READ_RE_CONFIG;//-11;
} }
#endif #endif
#if defined(__SAM3X8E__) || defined(ARDUINO_ARCH_STM32) //|| defined(ARDUINO_ARCH_ESP32) //|| defined(ARDUINO_ARCH_ESP8266) #if defined(__SAM3X8E__) || defined(ARDUINO_ARCH_STM32) || defined (NRF5) //|| defined(ARDUINO_ARCH_ESP32) //|| defined(ARDUINO_ARCH_ESP8266)
#if defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_ESP8266) #if defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_ESP8266)
WiFiClient configEthClient; WiFiClient configEthClient;
#else #else
@@ -1269,7 +1269,7 @@ lan_status loadConfigFromHttp(int arg_cnt, char **args)
} }
#endif #endif
#if defined(ARDUINO_ARCH_ESP8266) || defined(ARDUINO_ARCH_ESP32) #if defined(ARDUINO_ARCH_ESP8266) || defined(ARDUINO_ARCH_ESP32) //|| defined (NRF5)
HTTPClient httpClient; HTTPClient httpClient;
String fullURI = "http://"; String fullURI = "http://";
fullURI+=configServer; fullURI+=configServer;

View File

@@ -47,6 +47,7 @@
#ifdef NRF5 #ifdef NRF5
#include <NRFFlashStorage.h> #include <NRFFlashStorage.h>
#include <ArduinoHttpClient.h>
#endif #endif
#ifdef ARDUINO_ARCH_STM32 #ifdef ARDUINO_ARCH_STM32

View File

@@ -21,13 +21,14 @@ env_default =
; due-5500 ; due-5500
; controllino ; controllino
; stm32 ; stm32
; nrf52840 nrf52840
;build_dir = /tmp/pioenvs ;build_dir = /tmp/pioenvs
;libdeps_dir = /tmp/piolibdeps ;libdeps_dir = /tmp/piolibdeps
[env:nrf52840] [env:nrf52840]
platform = nordicnrf52 platform = nordicnrf52
board = nrf52840_dk board = nrf52840_dk
;board_build.variant = breakout
;upload_protocol = mbed ;upload_protocol = mbed
;upload_port = /dev/cu.SLAB_USBtoUART ;upload_port = /dev/cu.SLAB_USBtoUART
framework = arduino framework = arduino
@@ -57,11 +58,12 @@ lib_ignore =
;Adafruit_Sensor ;Adafruit_Sensor
ClosedCube HDC1080 ClosedCube HDC1080
SparkFun CCS811 Arduino Library SparkFun CCS811 Arduino Library
ESP8266HTTPClient
lib_deps = lib_deps =
https://github.com/anklimov/Arduino-Temperature-Control-Library.git https://github.com/anklimov/Arduino-Temperature-Control-Library.git
https://github.com/anklimov/DS2482_OneWire https://github.com/anklimov/DS2482_OneWire
https://github.com/anklimov/Ethernet2 https://github.com/anklimov/Ethernet2
ESP8266HTTPClient ArduinoHttpClient
https://github.com/anklimov/aJson https://github.com/anklimov/aJson
https://github.com/anklimov/CmdArduino https://github.com/anklimov/CmdArduino
https://github.com/anklimov/ModbusMaster https://github.com/anklimov/ModbusMaster