diff --git a/.travis.yml b/.travis.yml index 2a3fcb26..0e2d3e9b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,18 +15,22 @@ env: jobs: fast_finish: true include: - - name: "Feather 52840" + - name: "Feather nRF52840" env: VARIANT="feather52840" - - name: "Feather 52840 (All warnings)" + - name: "Feather nRF52840 (All warnings)" env: ALL_WARNINGS="true" VARIANT="feather52840" - - name: "Circuit Playground 52840" + - name: "Circuit Playground nRF52840" env: VARIANT="cplaynrf52840" - - name: "Circuit Playground 52840 (All warnings)" + - name: "Circuit Playground nRF52840 (All warnings)" env: ALL_WARNINGS="true" VARIANT="cplaynrf52840" - - name: "Feather 52832" + - name: "Feather nRF52832" env: VARIANT="feather52832" - - name: "Feather 52832 (All warnings)" + - name: "Feather nRF52832 (All warnings)" env: ALL_WARNINGS="true" VARIANT="feather52832" + - name: "ItsyBitsy nRF52840 Express" + env: VARIANT="itsybitsy52840" + - name: "Clue nRF52840" + env: VARIANT="cluenrf52840" allow_failures: - env: ALL_WARNINGS="true" VARIANT="feather52840" - env: ALL_WARNINGS="true" VARIANT="cplaynrf52840" diff --git a/libraries/Bluefruit52Lib/examples/Hardware/adc_vbat/.skip.cluenrf52840 b/libraries/Bluefruit52Lib/examples/Hardware/adc_vbat/.skip.cluenrf52840 new file mode 100644 index 00000000..e69de29b diff --git a/libraries/Bluefruit52Lib/examples/Hardware/adc_vbat/.skip.itsybitsy52840 b/libraries/Bluefruit52Lib/examples/Hardware/adc_vbat/.skip.itsybitsy52840 new file mode 100644 index 00000000..e69de29b diff --git a/libraries/Bluefruit52Lib/examples/Hardware/adc_vbat/adc_vbat.ino b/libraries/Bluefruit52Lib/examples/Hardware/adc_vbat/adc_vbat.ino index 86f59b3b..d70c67e2 100644 --- a/libraries/Bluefruit52Lib/examples/Hardware/adc_vbat/adc_vbat.ino +++ b/libraries/Bluefruit52Lib/examples/Hardware/adc_vbat/adc_vbat.ino @@ -8,8 +8,8 @@ uint32_t vbat_pin = PIN_VBAT; // A7 for feather nRF52832, A6 for nRF #define VBAT_MV_PER_LSB (0.73242188F) // 3.0V ADC range and 12-bit ADC resolution = 3000mV/4096 -#ifdef NRF52840_XXAA // if this is for nrf52840 -#define VBAT_DIVIDER (0.5F) // 150K + 150K voltage divider on VBAT +#ifdef NRF52840_XXAA +#define VBAT_DIVIDER (0.5F) // 150K + 150K voltage divider on VBAT #define VBAT_DIVIDER_COMP (2.0F) // Compensation factor for the VBAT divider #else #define VBAT_DIVIDER (0.71275837F) // 2M + 0.806M voltage divider on VBAT = (2M / (0.806M + 2M)) @@ -81,4 +81,5 @@ void loop() { Serial.println("%)"); delay(1000); -} \ No newline at end of file +} + diff --git a/libraries/Bluefruit52Lib/examples/Peripheral/ancs_oled/ancs_oled.ino b/libraries/Bluefruit52Lib/examples/Peripheral/ancs_oled/ancs_oled.ino index f5275d37..07e0b5be 100644 --- a/libraries/Bluefruit52Lib/examples/Peripheral/ancs_oled/ancs_oled.ino +++ b/libraries/Bluefruit52Lib/examples/Peripheral/ancs_oled/ancs_oled.ino @@ -28,25 +28,23 @@ /*------------- OLED and Buttons -------------*/ #if defined ARDUINO_NRF52832_FEATHER -// Feather nRF52832 -#define BUTTON_A 31 -#define BUTTON_B 30 -#define BUTTON_C 27 - -#elif defined ARDUINO_NRF52840_FEATHER -// Feather nRF52840 -#define BUTTON_A 9 -#define BUTTON_B 6 -#define BUTTON_C 5 + // Feather nRF52832 + #define BUTTON_A 31 + #define BUTTON_B 30 + #define BUTTON_C 27 #elif defined ARDUINO_NRF52840_CIRCUITPLAY -// Circuit Playground nRF52840 - FYI doesnt work probably because of button polarity! -#define BUTTON_A 4 // left button -#define BUTTON_B 7 // center switch -#define BUTTON_C 5 // right button + // Circuit Playground nRF52840 - FYI doesnt work probably because of button polarity! + #define BUTTON_A 4 // left button + #define BUTTON_B 7 // center switch + #define BUTTON_C 5 // right button #else -#error board not supported + // Default for others + #define BUTTON_A 9 + #define BUTTON_B 6 + #define BUTTON_C 5 + #endif Adafruit_SSD1306 oled(-1); diff --git a/libraries/Bluefruit52Lib/examples/Peripheral/image_upload/image_upload.ino b/libraries/Bluefruit52Lib/examples/Peripheral/image_upload/image_upload.ino index 6d8a217a..78d2326b 100644 --- a/libraries/Bluefruit52Lib/examples/Peripheral/image_upload/image_upload.ino +++ b/libraries/Bluefruit52Lib/examples/Peripheral/image_upload/image_upload.ino @@ -30,22 +30,23 @@ #include #include -#ifdef ARDUINO_NRF52832_FEATHER - #define TFT_DC 11 - #define TFT_CS 31 +#if defined(ARDUINO_NRF52832_FEATHER) + // Feather nRF52832 + #define TFT_DC 11 + #define TFT_CS 31 + +#elif defined(ARDUINO_NRF52840_CIRCUITPLAY) + // Circuit Playground Bluefruit for use with TFT 1.5" GIZMO + #define TFT_DC 1 + #define TFT_CS 0 + #define TFT_BACKLIGHT A3 + +#else + // Default for others + #define TFT_DC 10 + #define TFT_CS 9 #endif -#ifdef ARDUINO_NRF52840_FEATHER - #define TFT_DC 10 - #define TFT_CS 9 -#endif - -// Circuit Playground Bluefruit for use with TFT 1.5" GIZMO -#ifdef ARDUINO_NRF52840_CIRCUITPLAY - #define TFT_DC 1 - #define TFT_CS 0 - #define TFT_BACKLIGHT A3 -#endif #if TFT_IN_USE == TFT_35_FEATHERWING #include "Adafruit_HX8357.h" diff --git a/tools/build_all.py b/tools/build_all.py index 4f6178a4..6fc670d4 100644 --- a/tools/build_all.py +++ b/tools/build_all.py @@ -25,6 +25,8 @@ build_separator = '-' * 78 variants_dict = { 'feather52840': 'Feather nRF52840 Express', 'cplaynrf52840': 'Circuit Playground Bluefruit Express', + 'itsybitsy52840': 'ItsyBitsy nRF52840 Express', + 'cluenrf52840': 'Clue nRF52840', 'feather52832': 'Feather nRF52832' } diff --git a/variants/itsybitsy_nrf52840_express/variant.h b/variants/itsybitsy_nrf52840_express/variant.h index 91eb6e96..56c90b32 100644 --- a/variants/itsybitsy_nrf52840_express/variant.h +++ b/variants/itsybitsy_nrf52840_express/variant.h @@ -73,6 +73,7 @@ extern "C" #define PIN_A4 (18) #define PIN_A5 (19) #define PIN_A6 (20) +#define PIN_A7 (0xff) // to compile with Firmata library static const uint8_t A0 = PIN_A0 ; static const uint8_t A1 = PIN_A1 ; @@ -83,7 +84,7 @@ static const uint8_t A5 = PIN_A5 ; static const uint8_t A6 = PIN_A6 ; #define ADC_RESOLUTION 14 - //static const uint8_t AREF = PIN_AREF; +//static const uint8_t AREF = PIN_AREF; /* * Serial interfaces