BTLE and a Teensy 3.1?

BTLE and a Teensy 3.1? I’ve got the Bluetooth UART Friend from Adafruit and I can not get it to play nicely with the Teensy 3.1. I’ve tried every RX/TX pin combo I can think of, and tried every one of the example codes in the Adafruit_BluefruitLE_nRF51 library. The module powers up and connects with my phone but doesn’t ever seem to receive data.

Wondering if there’s some trick to wiring this that I’m just missing? Does the Teensy 3.1 even work with the Bluefruit nRF51 breakout?

what pins did you try?

The module’s lib doesnt seem to want to use hardware uart pins. Library sites 9/10 as the pins for Rx/Tx. 8 and 11 as RTS and CTS.

idk if thats a trick, but, that would have thrown me… personally if i saw these two things in a parts bin my instinct would be to wire TX & RX to the hardware UART and pull CTS to ground. I had a now old blueSmirf (about 8 years ago) that worked pretty much like that, so maybe thats just me.

did the lib seem to compile ok?

do you have an uno to try it out on (never hurts to eliminate a variable for testing)

not sure if thats the issue. but hope it helps!

I tried pins 9/10, 0/1 and 5/7 (switching both TX/RX on each combo just to be sure I wasn’t mixed up) – these are the TX/RX pins on Teensy 3.1. I didn’t try pulling CTS to ground… I will try that. I’ve gotten Teensy to work with an HC-05 module before but am having no luck with this newer one.

The code compiles and uploads just fine. It just doesn’t DO anything.

I haven’t tried plugging in an Uno, I may try that next. Thanks!

notable co-incedence that teensy has a hardware uart on the same two pins that adafruit suggests you wire up with their example which uses software serial (9/10) - https://learn.adafruit.com/introducing-the-adafruit-bluefruit-le-uart-friend/ -

it also says that the examples default to using the software UART ‘constructor’. so your pinout for default example code (w/out altering it) should probably be: 9/10 for Rx/Tx. 8 and 11 as RTS and CTS…idk whether you’re using trying to use the hardware or software serial part of the lib - it has both (apparently).

also - if the issue persists, posting in the PJRC forums could help too. i think there pretty responsive. but then again i guess its difficult w/o diagnostic errors from the compiler.

Did you change “Serial” (which is USB serial on Teensy) to “Serial1” (which is hardware serial on pins 0 & 1) ?

no… is that something I should do? Where do I change that?

The exact answer depends on the specific code and actual wiring you’re using… neither of which I can see here. But in general, on boards like Arduino Uno, there’s only 1 serial port which is accessed with “Serial”. On Teensy 3.1, you have 4 ports. They’re named “Serial”, “Serial1”, “Serial2” and “Serial3”. If you’re starting from an example Adafruit published for Arduino Uno, it almost certainly has Serial or SoftwareSerial rather than Serial1, Serial2 or Serial3.

Is there any documentation for using the BLE board with an arduino due? It also has an Arm processor and four hardware serial ports…

I’ve got a couple of these BTLE boards in the post that I intend to use with Teensy 3.2s… I’ll let you know how I get on

I got it working with lots of help from @Phillip_Burgess ​… Working on integrating fastLED and I will post some code once it does stuff.

What was the cause of the BTLE trouble? Even a quick summary might really help anyone else who finds this conversation by searching…

Solution was to use Serial1 (hardware UART) on pins 0 & 1 and do away with the SoftwareSerial stuff.