nrf52-ble-image-transfer-demo for nRF52840 Dongle

Hello everyone!
I'd like to implement the nrf52-ble-image-transfer-demo with a nRF52840 Dongle, for a small low-power image transfer application. My question now is, how do I need to alter the code so it would run on the dongle?

Thanks for your help,

Paul

Parents
  • Hi Paul

    I was able to get the example to build by changing the board definition in the project from BOARD_PCA10056 to BOARD_PCA10059, removing the UART configuration in main.c (remove uart_init() and any reference to it), and by adding a clause in the camera_init() function to check for the BOARD_PCA10059 define:

    static void camera_init(void)
    {
    #if defined(BOARD_PCA10056)
    	#if(PCA10056_USE_FRONT_HEADER == 1)
    			m_camera_init.pinScl = 13;
    			m_camera_init.pinSda = 15;
    			m_camera_init.pinSck = 21;
    			m_camera_init.pinMiso = 23;
    			m_camera_init.pinMosi = 25;
    			m_camera_init.pinCsn = 32 + 9;
    	#else
    			m_camera_init.pinScl = 27;
    			m_camera_init.pinSda = 26;
    			m_camera_init.pinSck = 32 + 15;
    			m_camera_init.pinMiso = 32 + 14;
    			m_camera_init.pinMosi = 32 + 13;
    			m_camera_init.pinCsn = 32 + 12;
    	#endif
    #elif defined(BOARD_PCA10040)
        m_camera_init.pinScl = 27;
        m_camera_init.pinSda = 26;
        m_camera_init.pinSck = 25;
        m_camera_init.pinMiso = 24;
        m_camera_init.pinMosi = 23;
        m_camera_init.pinCsn = 22;
    #elif defined(BOARD_PCA10059)
        // Set your pin assignment here
    #else
    #error Board not defined or not supported
    #endif    
        arducam_mini_2mp_open(&m_camera_init);
        arducam_mini_2mp_setResolution(OV2640_320x240);
    }

    If you do the same, and add the correct pin configuration in the camera_init() function to set up the SPI and I2C interfaces, then in theory it should run on the dongle. 

    I say 'in theory' because I haven't tested it myself, I will leave that to you Wink

    Best regards
    Torbjørn

Reply
  • Hi Paul

    I was able to get the example to build by changing the board definition in the project from BOARD_PCA10056 to BOARD_PCA10059, removing the UART configuration in main.c (remove uart_init() and any reference to it), and by adding a clause in the camera_init() function to check for the BOARD_PCA10059 define:

    static void camera_init(void)
    {
    #if defined(BOARD_PCA10056)
    	#if(PCA10056_USE_FRONT_HEADER == 1)
    			m_camera_init.pinScl = 13;
    			m_camera_init.pinSda = 15;
    			m_camera_init.pinSck = 21;
    			m_camera_init.pinMiso = 23;
    			m_camera_init.pinMosi = 25;
    			m_camera_init.pinCsn = 32 + 9;
    	#else
    			m_camera_init.pinScl = 27;
    			m_camera_init.pinSda = 26;
    			m_camera_init.pinSck = 32 + 15;
    			m_camera_init.pinMiso = 32 + 14;
    			m_camera_init.pinMosi = 32 + 13;
    			m_camera_init.pinCsn = 32 + 12;
    	#endif
    #elif defined(BOARD_PCA10040)
        m_camera_init.pinScl = 27;
        m_camera_init.pinSda = 26;
        m_camera_init.pinSck = 25;
        m_camera_init.pinMiso = 24;
        m_camera_init.pinMosi = 23;
        m_camera_init.pinCsn = 22;
    #elif defined(BOARD_PCA10059)
        // Set your pin assignment here
    #else
    #error Board not defined or not supported
    #endif    
        arducam_mini_2mp_open(&m_camera_init);
        arducam_mini_2mp_setResolution(OV2640_320x240);
    }

    If you do the same, and add the correct pin configuration in the camera_init() function to set up the SPI and I2C interfaces, then in theory it should run on the dongle. 

    I say 'in theory' because I haven't tested it myself, I will leave that to you Wink

    Best regards
    Torbjørn

Children
No Data
Related