0

I am trying to explore the possibilities of connecting an Arduino to Phonegap/Cordova. I have a RedBearLab BLE Shield, which I want to test the connection with. My MVP would be to get the value of a PIN to a Cordova app. Nevertheless, I couldn't make it even close.

The closest I got, it was using Don Coleman's Phonegap plugin. I am trying his Simple Chat example.

With this example the sketch is attempting to include Nordic_nRF8001.h. Nevertheless, I can't seem to find this library. I downloaded it from various sources, but no matter what I do, my sketch still can't find the file.

The only way I could make it work was via CodeBender, but then the readings were a bit of a mess.

I'm not expecting anyone to do all the work for me, so if you can help me in one of the two directions, it would be awesome:

  1. Figure out why I can't find that Nordic_nRF8001.h file.
  2. Or help me find another method of BLE communication.

Later edit Using the examples that come with RBL library, I figured out the name of the files I need to use. Now I'm running into another problem for which I opened a new question.

Thank you!

dda
1,5951 gold badge12 silver badges17 bronze badges
asked Mar 31, 2020 at 21:18
2
  • I tried using the web editor. There I could find the SimpleChat example, with the correct names of the libraries. They work perfectly. Commented Apr 4, 2020 at 20:20
  • The scrambled characters issue was because of the wrong Baud Rate. Commented Apr 4, 2020 at 20:21

1 Answer 1

0

I used Arduino Create Web Editor to load the SimpleChat example. It loads with these libraries, and it works perfectly:

#include <SPI.h>
#include <EEPROM.h>
#include <boards.h>
#include <RBL_nRF8001.h>

Thanks, Andi

answered Apr 4, 2020 at 20:22

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.