USB TinyShield and Bluetooth

USB TinyShield and Bluetooth
« on: October 27, 2018, 12:42:51 PM »
Hi guys,

I'm fairly new to this, and I have been testing the template UARTPAssThrough for now. I have been following this tutorial https://tinycircuits.com/blogs/learn/bluetooth-low-energy-tinyshield-st-tutorial but for some reason when the USB TinyShield is attached, the bluetooth does not seem to work and because of that I cannot view anything on serial monitor. Is there something that I missed out?

Re: USB TinyShield and Bluetooth
« Reply #1 on: December 28, 2018, 03:59:35 PM »
Is the baud rate in the program .ino and the Serial Monitor the same?

Re: USB TinyShield and Bluetooth
« Reply #2 on: January 02, 2019, 06:30:25 PM »
I'm also having trouble getting the UARTPassThrough sketch -- the example in the STBLE library -- to work. I'm using the Arduino IDE (1.8.8) with a TinyDuino Basic Kit (Coin Cell), BLE TinyShield (ST) and accelerometer TinyShield.

In my case, it appears the sketch never escapes the setup() block. At 9600 baud the serial monitor spits O(10) garbage characters (e.g. BLE StacQ⸮) and then nothing else. At 115200 baud the serial monitor floods with repeated BLE Stack Initialized ... UART service added successfully. messages. In both instances the baud rate set in the sketch and in the serial monitor window match properly. Screenshots attached.

In neither case does the chip become discoverable to scanning devices. I'm new to this whole Arduino/TinyDuino scene, so guidance from you more experienced folks is very welcome! (I emailed info@tinycircuits late this afternoon, but I figured it wouldn't hurt to ask here too.)


Re: USB TinyShield and Bluetooth
« Reply #3 on: January 02, 2019, 09:52:28 PM »
I've found what seems to be a solution. Full disclosure: I know next to nothing about C++ or Arduino programming.

The BLEsetup() function in the setup loop would never terminate. I added a return control at the end of that function (which lives in the UART.ino) -- that fixed the issue. Maybe that's not the best way to do it, but for now I am able to pass data back and forth via the BLE connection.

I'm all ears if there is a more correct solution.


Re: USB TinyShield and Bluetooth
« Reply #4 on: March 21, 2019, 04:56:15 AM »
It's very good with what you are doing right now.

Re: USB TinyShield and Bluetooth
« Reply #5 on: March 22, 2019, 07:48:10 PM »
I am having the same problem from the same tutorial

The serial monitor is spitting out garbage content.

I have baud rates that match.  Tried 9600 and 115200.  Same problem.

Tried the return control and that did not seem to fix it either.

Any other thoughts?