Flora with Adafruit nrf8001

Wearable electronics: boards, conductive materials, and projects from Adafruit!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
rmoquin
 
Posts: 65
Joined: Wed Jun 04, 2014 10:22 am

Flora with Adafruit nrf8001

Post by rmoquin »

I've been trying to figure out how to get the Flora working with the Flora (I had it working with the Micro, though it seemed like when you disconnected the first time, you wouldn't be able to connect to it again). I have the nrf8001 hooked up to (probably barely, since that was a pain in the rear) the Flora ICSP.. basically, I think I hooked up 6 of the nrf8001 wires to the icsp header (so pin 5 on the header is the reset). Due to the overhead of using interrupts, I figured I'd not use interrupts, but what do you put into the constructor for that value? What about the ICSP-5 pin for reset? Do I just put 5? The RDY pin, I hooked to Flora pin 9.

I'm trying to figure out if I'm on the correct track? I'm trying to minimize use of the other pads since I still need to hook hook in a few more things and am not sure when I'll hit not sure the limit (only have the nrf8001 and lsmds0, I'm already over 50% of the memory barely have any code in my main program so far so this might be a challenge. I heard the neopixels library takes a lot of memory.... To output some text to the console for debugging, I'm assuming I need to use Serial1, I haven't been getting any output which is making it tricky to figure out what's going on... Can anyone atleast confirm that these are correct assumptions? Thanks!

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Flora with Adafruit nrf8001

Post by adafruit_support_rick »

You only want to hook up MISO, MOSI, and SCK to the ICSP. Do not hook up RST or anything else to the ICSP.

You need to use the interrupt. There is no overhead associated with interrupts that you need to worry about.

Connect REQ to D10, and connect RST to D9.
Connect RDY to one of D0/RX, D1/TX, D2/SDA, or D3/SCL - whichever is free.
rmoquin wrote:To output some text to the console for debugging, I'm assuming I need to use Serial1
No, you use Serial. Serial1 goes through the RX/TX pins.

User avatar
rmoquin
 
Posts: 65
Joined: Wed Jun 04, 2014 10:22 am

Re: Flora with Adafruit nrf8001

Post by rmoquin »

Oh, I thought you could use the other pins on the SPI header... so you can't use 2 for power and 6 for Gnd? If not, I might be running out of power and ground pins very quickly.

So basically, you have to hook up the interrupt pin but you don't have to use interrupts. I might as well use it then, I thought you lost quite a few clock cycles in order to process interrupts.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Flora with Adafruit nrf8001

Post by adafruit_support_rick »

ICSP 2 for power goes the other way - it's for supplying power to a target processor for programming. In the case of the FLORA, it's not connected.

GND is connected - you can use that.

I'm not sure what you mean about not using interrupts. The nRF8001 library is based on interrupts. You don't have a choice.

User avatar
rmoquin
 
Posts: 65
Joined: Wed Jun 04, 2014 10:22 am

Re: Flora with Adafruit nrf8001

Post by rmoquin »

Oh, the power goes the other way? Weird.. thought I read it was an input for some reason. That explains a lot then :)

The nrf8001 library has an example that doesn't use an interrupt, but specifies an interrupt pin, since there isn't anyway around that. It doesn't specify any callbacks though.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Flora with Adafruit nrf8001

Post by adafruit_support_rick »

rmoquin wrote:Oh, the power goes the other way? Weird.. thought I read it was an input for some reason. That explains a lot then :)
It is an input. I thought you were trying to power the nRF8001 from that pin. Of course, as I said, it's not connected to anything on the FLORA, anyway.
rmoquin wrote:The nrf8001 library has an example that doesn't use an interrupt, but specifies an interrupt pin, since there isn't anyway around that. It doesn't specify any callbacks though.
The interrupts happen deep down inside the nRF8001 library. They are not at the level of the sketch.

User avatar
rmoquin
 
Posts: 65
Joined: Wed Jun 04, 2014 10:22 am

Re: Flora with Adafruit nrf8001

Post by rmoquin »

Oops sorry, I've been sick the past few days and apparently botched that statement. I did mean output, not input.

Oh gotcha, I wondered why it used "callback" in the same, I wondered if that was the case. Considering you have to use the interrupt anyway, I'm not sure why anyone would want to not use the callbacks since you are then going back to polling statuses rather than being notified when something changes...

Ryan

Locked
Please be positive and constructive with your questions and comments.

Return to “Wearables”