From 1303c106b5383785927b8749c16cdaf9abdd3840 Mon Sep 17 00:00:00 2001 From: Andrey Klimov Date: Sun, 12 May 2019 18:09:39 +0300 Subject: [PATCH] First sucsessfull working build on NRF52840+Wiznet5500 --- lighthub/dmx.cpp | 3 +++ lighthub/main.cpp | 10 +++++----- lighthub/main.h | 1 + platformio.ini | 6 ++++-- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/lighthub/dmx.cpp b/lighthub/dmx.cpp index 3f49fc2..29ef073 100644 --- a/lighthub/dmx.cpp +++ b/lighthub/dmx.cpp @@ -245,7 +245,10 @@ dmxout.begin(); dmxout.setTxMaxChannels(channels); #endif #endif + +#ifndef DMX_DISABLE for (int i=1;i<=channels;i++) DmxWrite(i,0); +#endif } void ArtnetSetup() diff --git a/lighthub/main.cpp b/lighthub/main.cpp index e0588f3..dc6b028 100644 --- a/lighthub/main.cpp +++ b/lighthub/main.cpp @@ -361,7 +361,7 @@ if (WiFi.status() != WL_CONNECTED) } #endif -#if defined(ARDUINO_ARCH_AVR) || defined(__SAM3X8E__) +#if defined(ARDUINO_ARCH_AVR) || defined(__SAM3X8E__) || defined (NRF5) wdt_dis(); if (lanStatus > 0) switch (Ethernet.maintain()) { @@ -687,7 +687,7 @@ wifiManager.setTimeout(30); } #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 Ethernet.w5500_cspin = W5500_CS_PIN; debugSerial< +#include #endif #ifdef ARDUINO_ARCH_STM32 diff --git a/platformio.ini b/platformio.ini index 42bd775..ae3bdc4 100644 --- a/platformio.ini +++ b/platformio.ini @@ -21,13 +21,14 @@ env_default = ; due-5500 ; controllino ; stm32 -; nrf52840 + nrf52840 ;build_dir = /tmp/pioenvs ;libdeps_dir = /tmp/piolibdeps [env:nrf52840] platform = nordicnrf52 board = nrf52840_dk +;board_build.variant = breakout ;upload_protocol = mbed ;upload_port = /dev/cu.SLAB_USBtoUART framework = arduino @@ -57,11 +58,12 @@ lib_ignore = ;Adafruit_Sensor ClosedCube HDC1080 SparkFun CCS811 Arduino Library + ESP8266HTTPClient lib_deps = https://github.com/anklimov/Arduino-Temperature-Control-Library.git https://github.com/anklimov/DS2482_OneWire https://github.com/anklimov/Ethernet2 - ESP8266HTTPClient + ArduinoHttpClient https://github.com/anklimov/aJson https://github.com/anklimov/CmdArduino https://github.com/anklimov/ModbusMaster