nRF51 add-on for Teensy

Status
Not open for further replies.

onehorse

Well-known member
In my quest to add connectivity beyond simple nRF24 2.4 GHz radio to my projects I am exploring various options. One is the ESP8266 which I hope to get working next week (still looking for alpha testers). The other is blue tooth radio in the form of the nRF51822. Adafruit has a nice library for their nRF51 breakout (SPI Friend) and I recommend people buy it if they want blue tooth added to their Teensy projects. I made my own version of Adafruit's hardware in an appallingly small add-on board specifically for the Teensy:

nRF51AddOn.jpg

I verified I can program it using a RedBear Labs programmer and mbed and get the on-board leds to blink (it should also work with an SWD debugger and Crossworks or whatever your favorite tool chain is). This is a good start. I'll be working in the next few days to get the add-on to work like Adafruit's SPI Friend. This "should" be as easy as using the nRF24 library. We'll see.

I have no trouble using Maniacbug's nRF24 library with the Teensy. Anyone know if there are any teensiduino-friendly nRF51 libraries about?
 
Hi,

I'm currently trying a Adafruit BLE SPI Friend (running a nRF51) with a Teensy 3.2 but it seems that the IRQ pin of the BLE board does not have a change state when datas are available. Have you tried this ? Otherwise the BLE module works perfectly with Teensy 3.2 - except IRQ at this time.

Thanks
 
I use the TMRh20 library with all of my Arduinos, Teensy 3.2 included.

The IRQ line is not used. The radio.available() function is the substitute.
 
Thanks for the quick reply !

That's strange because it differs from what I read on the Bluefruit SPI product page (https://learn.adafruit.com/introducing-the-adafruit-bluefruit-spi-breakout/pinouts#) and also here (https://dzone.com/articles/how-to-add-bluetooth-low-energy-blte-connection-to).

That's also mean I can't count on any pin change to know that new datas are available on BLE and get them with an ISR function.

Is there any way to have an ISR based on ble.available() instead of a pin ?
 
Because the pin exists on the nRF24, you would expect it to work. However, the library may have to turn it on via register manipulation. With the libraries I've used, Maniac and TMRh20, the IRQ pin was never used or had any wire connected to it. The nRF24L01+ data sheet may give you some clues. You could also watch the pin with a scope or tie it to a transistor and LED and see if something is there.

Most of the time, radio.available() is sampled in loop() often enough that an IRQ routine may not gain you much. Try some tests and let us know what happens. Many people are likely curious about this pin.
 
Ahah, no worries ;)

Yes I was talking about Bluetooth LE, not a RF transmitter, because I do need BLE to control my application with a phone. Otherwise, I think that it is more CPU consuming to check at every loop if there is new datas instead of an interrupt. But maybe I'm wrong.

So, I'm still waiting for advice about this IRQ, of Pin flag from the nRF51822 - does it work... ?
 
Status
Not open for further replies.
Back
Top