Skip to content

Support for Adafruit Feather nRF52840 Sense #1647

Closed

Description

@SamShort7

Hey,

I'm currently working with an Adafruit Feather nRF52840 Sense.

I understand this isn't currently supported but I'm wondering if it's close enough in function to the Feather Express to use.
Is it possible/would it work to tell FastLED that it's a feather express or modify the fastpin_arm_nrf52_variants.h file to add a new definition for the Feather sense?

Excuse me if this is a dumb question, it's a bit beyond my usual experience.

I appreciate your time,
Thank you,
Sam

Activity

  1. SamShort7 commented on Jul 24, 2024

    @SamShort7
    Author

    I think I've worked it out,
    this seems to be working, but if someone could let me know if this was the wrong approach it'd be great.

    Referring to the Adafruit Package index I checked the pin definitions and added this code to the fastpin_arm_nrf52_variants.h file

    
        // Adafruit Bluefruit nRF52840 Feather Sense
        // From https://www.adafruit.com/package_adafruit_index.json
        #if defined (ARDUINO_NRF52840_FEATHER_SENSE)
        #if defined(__FASTPIN_ARM_NRF52_VARIANT_FOUND)
            #error "Cannot define more than one board at a time"
        #else
            #define __FASTPIN_ARM_NRF52_VARIANT_FOUND
        #endif
    
        // Arduino pins 0..7
        _FL_DEFPIN( 0, 25, 0); // D0  is P0.25 -- UART TX
        //_FL_DEFPIN( 1, 24, 0); // D1  is P0.24 -- UART RX
        _FL_DEFPIN( 2, 10, 0); // D2  is P0.10 -- NFC2
        _FL_DEFPIN( 3, 43, 1); // D3  is P1.11 
        _FL_DEFPIN( 4, 42, 1); // D4  is P1.10 -- PIN_LED2 (blue)
        _FL_DEFPIN( 5, 40, 1); // D5  is P1.08 -- SPI/SS
        _FL_DEFPIN( 6,  7, 0); // D6  is P0.07
        _FL_DEFPIN( 7, 34, 1); // D7  is P1.02 -- PIN_DFU (Button)
        
        // Arduino pins 8..15
        _FL_DEFPIN( 8, 16, 0); // D8  is P0.16 -- PIN_NEOPIXEL
        _FL_DEFPIN( 9, 26, 0); // D9  is P0.26
        _FL_DEFPIN(10, 27, 0); // D10 is P0.27
        _FL_DEFPIN(11,  6, 0); // D11 is P0.06
        _FL_DEFPIN(12,  8, 0); // D12 is P0.08
        _FL_DEFPIN(13, 41, 1); // D13 is P1.09 -- PIN_LED1 (red)
        _FL_DEFPIN(14,  4, 0); // D14 is P0.04 -- A0
        _FL_DEFPIN(15,  5, 0); // D15 is P0.05 -- A1
    
        // Arduino pins 16..23
        _FL_DEFPIN(16, 30, 0); // D16 is P0.30 -- A2
        _FL_DEFPIN(17, 28, 0); // D17 is P0.28 -- A3
        _FL_DEFPIN(18,  2, 0); // D18 is P0.02 -- A4
        _FL_DEFPIN(19,  3, 0); // D19 is P0.03 -- A5
        //_FL_DEFPIN(20, 29, 0); // D20 is P0.29 -- A6 -- Connected to battery!
        //_FL_DEFPIN(21, 31, 0); // D21 is P0.31 -- A7 -- AREF
        _FL_DEFPIN(22, 12, 0); // D22 is P0.12 -- SDA
        _FL_DEFPIN(23, 11, 0); // D23 is P0.11 -- SCL
    
        // Arduino pins 24..31
        _FL_DEFPIN(24, 15, 0); // D24 is P0.15 -- PIN_SPI_MISO
        _FL_DEFPIN(25, 13, 0); // D25 is P0.13 -- PIN_SPI_MOSI
        _FL_DEFPIN(26, 14, 0); // D26 is P0.14 -- PIN_SPI_SCK
        //_FL_DEFPIN(27, 19, 0); // D27 is P0.19 -- PIN_QSPI_SCK
        //_FL_DEFPIN(28, 20, 0); // D28 is P0.20 -- PIN_QSPI_CS
        //_FL_DEFPIN(29, 17, 0); // D29 is P0.17 -- PIN_QSPI_DATA0
        //_FL_DEFPIN(30, 22, 0); // D30 is P0.22 -- PIN_QSPI_DATA1
        //_FL_DEFPIN(31, 23, 0); // D31 is P0.23 -- PIN_QSPI_DATA2
    
        // Arduino pins 32..34
        //_FL_DEFPIN(32, 21, 0); // D32 is P0.21 -- PIN_QSPI_DATA3
        //_FL_DEFPIN(33,  9, 0); // D33 is NFC1, only accessible via test point
       #endif // defined (ARDUINO_NRF52840_FEATHER_SENSE)
    
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions