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

Can i use code written in arduino IDe for nrf51822

Currently i was using arduino for my development but now i want to move forward with Some SOC so i found nrf51822 IC.For using nrf51822 ic i need to buy another board which is ble400 which i purchased it from ebay and now i am facing difficulty as i don't no where to start and how i can use code which i wrote using arduino IDE to nrf51822, is there any reference which can tell me the compatibility of arduino with nrf51822.

Parents
  • Hello.

    There is no "magical" way to make arduino code work on the nRF51. You must use an arduino-style abstraction layer in between. Your hardware must also support programming over the serial port.

    There are some third party vendors who have created devices able to be programmed like an arduino. One example is redbearlabs, another is the RFduino. The official Arduino is also soon coming with devices both with nRF51 (Arduino 101) and the nRF52 ( Arduino Primo).

    There are ways to compile and generate hex files using the arduino IDE+compiler, and then flash this file to an nRF51 using other tools. This might not work, as the arduino abstraction is probably created to work with a certain hardware setup. You can for example not assume that the program created with the redbearlabs with automagically work with your ble400 board. This requires a lot of know-how, and users with this level of knowledge normally don't use arduino anyway.

    I would advice you to examine the website for your ble board, to see if they have any getting-started guides. You should also search this forum, then you will find posts like this, which explains what tools you need to program the ble400 board.

    To summarize, you are probably better of buying A: An arduino compatible nRF51 board. B: A nRF51/nRF52 Dev Kit and use the tools and guides provided by Nordic.

    Let me know if you have any more questions.

    -Anders

Reply
  • Hello.

    There is no "magical" way to make arduino code work on the nRF51. You must use an arduino-style abstraction layer in between. Your hardware must also support programming over the serial port.

    There are some third party vendors who have created devices able to be programmed like an arduino. One example is redbearlabs, another is the RFduino. The official Arduino is also soon coming with devices both with nRF51 (Arduino 101) and the nRF52 ( Arduino Primo).

    There are ways to compile and generate hex files using the arduino IDE+compiler, and then flash this file to an nRF51 using other tools. This might not work, as the arduino abstraction is probably created to work with a certain hardware setup. You can for example not assume that the program created with the redbearlabs with automagically work with your ble400 board. This requires a lot of know-how, and users with this level of knowledge normally don't use arduino anyway.

    I would advice you to examine the website for your ble board, to see if they have any getting-started guides. You should also search this forum, then you will find posts like this, which explains what tools you need to program the ble400 board.

    To summarize, you are probably better of buying A: An arduino compatible nRF51 board. B: A nRF51/nRF52 Dev Kit and use the tools and guides provided by Nordic.

    Let me know if you have any more questions.

    -Anders

Children
No Data
Related