This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Porting nRF51422 to Arduino environment

Hi all,

I would like to use the Arduino programming environment on my nRF51422 prototype. I have seen that RedBearLab has done the migration for the nRF51822 which quite similar. The source code is available here: github.com/.../nRF51822-Arduino Rfduino did also do it apparently: github.com/.../RFduino

Does someone have some experience on the this topic? I suppose that adapting the RedBear code to the nRF51422 should not be a problem. I am just not sure about the different modifications that I have to make.

Thank you

  • Hi

    As you point out, you could use the Arduino IDE with the RedBearLab nrf51822 board. Follow the instructions on the link and you have number of example programs to choose from in the Arduino IDE to flash to the board, BLE enabled and not BLE enabled. Also an option to use MBED on this board. With that you should be able to build a prototype.

    You could also start to use the nRF51 SDK directly (programming in C) with the nRF51 DK board. That way, you have better control and can do more specific things than with MBED and Arduino. When using nRF51 DK and the nRF51 SDK, you can use Keil IDE, gcc, or IAR IDE. Keil is the most common to use, it is free to use up to 32kB code size, which is adequate for most prototypes. The nRF51 DK also supports MBED, but does not support Arduino IDE.

    If you feel comfortable already with the Arduino IDE, the easiest way is perhaps to start with that and see how far you can go. Perhaps you are able to do everything you need for your prototype and do not have to shift to nRF51 SDK.

  • You should not need to make any changes in the code between nRF51822 and nRF51422. Do you have a SWD debug interface on your prototype? I think rfDuino uses the uart interface to flash new firmware using a serial bootloader.

Related