RBL NanoV2 / ArduinoIDE / BLE-Controller APP


#1

Hey,

I’m fairly new to RBL and the Arduino stuff - what I try is to control the RBL NanoV2 with the BLE-Controller App on the one hand, and to program it with the ArduinoIDL on my Computer on the other Hand.

In order to control the RBL NanoV2 with the App, I tried to Upload the BLE-Controller Scetch , wich works if I select the the RBL_BLED_2 (wich isn’t the right Board) as the board. I’m able to connect my phone and the BLE-Controller APP with the RBL NanoV2 But if I set the Ports to OUTPUT and “HIGH” my LED doesnt turn on. (I guess the reason is, that he try to use Pin4 (as an example) on the RBL_BLED_2 - but this isnt the pin on the BLE_NANO_2
If I select the BLE_NANO_2 as the Board I get a error when I upload the BLEContoller scetch:
2018-02-28_1047

If I select the BLE_NANO_2 as the Board and use the Blink scetch from the ArduinoIDL (changing the pinMode to pin5) I’m able to let my LED blinking
2018-02-28_1051

What do I have to do, to be able to Use the BLE-CONROLLER APP and be able to controle my Pins in oder to turn a LED on and off?


#2

So far, I found out that the BLE_Nano was written wrong.
Changed it from BLE_Nano -> BLE_Nano2
After the change I was able to compile the scetch for the BLE_Nano2 but now my BLE-Control App cant find my device anymore :cry:


#3

Hi @yannikwendt,

From where you change this? I cannot see the “BLE Nano” key words presented in your post. Have you installed the board package as instructed here? Is the BLE Controller App you are using for iOS or Android?

Best regards,
Guohui


#4

In my first picture, there is a second tab called :“pin_inf.h” (it accidentaly didnt uploaded the pic)
If I understand the Code in the right way, all the pins get defined there for the RBL_BLED2 and the BLE_NANO2 and this is where I changed the name from BLE_NANO to BLE_NANO2


#5

Hi @yannikwendt,

It seams like this sketch does not support BLE Nano 2 yet.

Try adding the code snippet below in the pin_inf.h and play with BLE Controller App again:

...
#ifdef RBL_BLEND2

...

#endif

#ifdef BLE_NANO2

#define TOTAL_ANALOG_PINS 4
#define TOTAL_PINS        8
#define VERSION_BLINK_PIN 13
#define IS_PIN_DIGITAL(p) ( (p) >= 2 && (p) < 10 )
#define IS_PIN_ANALOG(p)  ( (p) == 2 || (p) == 3 || (p) == 4 || (p) == 5)
#define IS_PIN_PWM(p)     ( (p) > 2 && (p) < 10  )
#define IS_PIN_SERVO(p)   ( (p) > 2 && (p) < 10  )

#define PIN_TO_DIGITAL(p) (p)
#define PIN_TO_ANALOG(p)  (p)
#define PIN_TO_PWM(p)     PIN_TO_DIGITAL(p)
#define PIN_TO_SERVO(p)   (p)

#endif

...

Best regards,
Guohui


#6

Thank you VERY much!!! it worked :+1::+1::+1::+1: