0

Running Neopixels with the Circuit Playground Classic + BLE
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Running Neopixels with the Circuit Playground Classic + BLE

by andrewa on Sat Feb 02, 2019 3:54 pm

I'm trying to use the Circuit Playground Classic with the Adafruit BLE wearable. Is this doable? I would think yes.

In the neopixel_picker code, you have to do the following (as like the Flora):

#define BLUEFRUIT_HWSERIAL_NAME Serial1

/* ...or hardware serial, which does not need the RTS/CTS pins. Uncomment this line */
Adafruit_BluefruitLE_UART ble(BLUEFRUIT_HWSERIAL_NAME, BLUEFRUIT_UART_MODE_PIN);

The Adafruit Flora BLE module is connecting, but it is unclear what the pin number is for the Neopixels; I'm assuming that the number of Neopixels is 10, of course. Is it 17?

I've also tried this with a Flora, but can't seem to get this to work (pin 8), even with one NeoPixel. This is mentioned here:

viewtopic.php?f=51&t=141460&p=699540&hilit=flora+ble+neopixel#p699540

The Flora version does connect:

Requesting Bluefruit info:
----------------
BLEFRIEND32
nRF51822 0x00D6
808356DDD316BEC7
0.6.2
0.6.2
Apr 30 2015
S110 8.0.0, 0.2

... and when I try the BLE app on an iPhone, it connects (and the 'Data' message pops up):

***********************
Switching to DATA mode!
***********************

when trying to connect, but the app says 'Status: Not detected', and I don't get a NeoPixel lit either. Is the default code for the Flora in version 1.9.5 in the library correct? Or is there something else going on here?

I've updated the firmware on the BLE module (0.8.0) and still, no connectivity.

Thanks.

andrewa
 
Posts: 134
Joined: Mon Oct 19, 2009 9:53 pm

Re: Running Neopixels with the Circuit Playground Classic +

by adafruit_support_carter on Mon Feb 04, 2019 2:31 pm

You have one of these:
https://www.adafruit.com/product/3000
with one of these:
https://www.adafruit.com/product/2487
connected via serial?

You say it both connects and doesn't connect:
The Adafruit Flora BLE module is connecting

I've updated the firmware on the BLE module (0.8.0) and still, no connectivity.

Can you clarify what you mean here.

adafruit_support_carter
 
Posts: 10430
Joined: Tue Nov 29, 2016 2:45 pm

Re: Running Neopixels with the Circuit Playground Classic +

by andrewa on Mon Feb 04, 2019 2:41 pm

Sorry- This was a CP connected to a Flora BLE module, like: https://www.adafruit.com/product/2487

I've also tried a Flora with the Flora BLE module, as wired in: https://learn.adafruit.com/adafruit-flo ... e/overview

So, the serial connection between the Flora (or CP) with the Flora BLE works (since we get the Data message back):

***********************
Switching to DATA mode!
***********************

However, I can' t get the Neopixel on the Flora (or any of the CP ones) to illuminate. Nor can I see any data from the phone (i.e., GPS location, accelerometer).

So, it seems there is *some* connectivity, but not complete.

andrewa
 
Posts: 134
Joined: Mon Oct 19, 2009 9:53 pm

Re: Running Neopixels with the Circuit Playground Classic +

by adafruit_support_carter on Mon Feb 04, 2019 8:38 pm

Is the basic BLE connection between the phone and BLE module happening OK? Your phone sees the device and can pair with it?

adafruit_support_carter
 
Posts: 10430
Joined: Tue Nov 29, 2016 2:45 pm

Re: Running Neopixels with the Circuit Playground Classic +

by andrewa on Mon Feb 04, 2019 8:51 pm

Yeah, that's the odd part - it will pair, and when you go to do any fun stuff, nothing happens.

I just got it to work (in desperation!) by flipping the *switch* to DATA, but this should happen with AT commands, correct? In the comments, it says that it should be started in COMMAND mode, but there is no comment about physically moving the switch to DATA, which I thought would be more explicit. Hmmmm.

If it said "Switch to DATA mode with the switch after connecting with the app" that would tell me that yeah, you have to go over and flip the switch!

Is this a case of operator error + some ambiguous instructions?

I did note:

// Set Bluefruit to DATA mode
Serial.println( F("Switching to DATA mode!") );
ble.setMode(BLUEFRUIT_MODE_DATA);

So, I figured it was doing this automatically...

andrewa
 
Posts: 134
Joined: Mon Oct 19, 2009 9:53 pm

Re: Running Neopixels with the Circuit Playground Classic +

by adafruit_support_carter on Tue Feb 05, 2019 2:19 pm

Which version of the constructor are you using in the example sketch?
https://github.com/adafruit/Adafruit_Bl ... er.ino#L66

adafruit_support_carter
 
Posts: 10430
Joined: Tue Nov 29, 2016 2:45 pm

Re: Running Neopixels with the Circuit Playground Classic +

by andrewa on Tue Feb 05, 2019 7:23 pm

Ah, I'm using:

/* ...or hardware serial, which does not need the RTS/CTS pins. Uncomment this line */
Adafruit_BluefruitLE_UART ble(BLUEFRUIT_HWSERIAL_NAME, BLUEFRUIT_UART_MODE_PIN);

So, the mode can't be set via the AT command, you need another line to connect to the Flora BLE unit?

I was following the instructions, where it states:

Also, we expect you will not use the mode pad so you can keep the switch set to CMD and then change into Data mode by sending +++ .

andrewa
 
Posts: 134
Joined: Mon Oct 19, 2009 9:53 pm

Re: Running Neopixels with the Circuit Playground Classic +

by adafruit_support_carter on Wed Feb 06, 2019 1:05 pm

Try changing that line in your sketch to:
Code: Select all | TOGGLE FULL SIZE
Adafruit_BluefruitLE_UART ble(BLUEFRUIT_HWSERIAL_NAME, -1);


The driver won't actually send the +++ if the mode pin is passed in:
https://github.com/adafruit/Adafruit_Bl ... T.cpp#L171

adafruit_support_carter
 
Posts: 10430
Joined: Tue Nov 29, 2016 2:45 pm

Re: Running Neopixels with the Circuit Playground Classic +

by andrewa on Sun Feb 10, 2019 2:54 pm

Works fine now, thanks.

andrewa
 
Posts: 134
Joined: Mon Oct 19, 2009 9:53 pm

Please be positive and constructive with your questions and comments.