TinyCircuits

TinyCircuits Products => TinyDuino => Topic started by: r33fer on October 27, 2018, 12:42:51 PM

Title: USB TinyShield and Bluetooth
Post by: r33fer 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?
Title: Re: USB TinyShield and Bluetooth
Post by: lennevia on December 28, 2018, 03:59:35 PM
Is the baud rate in the program .ino and the Serial Monitor the same?
Title: Re: USB TinyShield and Bluetooth
Post by: loaf 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.)

Andrew
Title: Re: USB TinyShield and Bluetooth
Post by: loaf 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.

Andrew
Title: Re: USB TinyShield and Bluetooth
Post by: digital1440 on March 22, 2019, 07:48:10 PM
I am having the same problem from the same tutorial
https://tinycircuits.com/blogs/learn/bluetooth-low-energy-tinyshield-st-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?
Title: Re: USB TinyShield and Bluetooth
Post by: Chicadian on April 09, 2019, 06:24:22 PM
You're not alone. I'm having the same issue following the tutorial as suggested. Maybe there's a step missing that isn't listed?
Title: Re: USB TinyShield and Bluetooth
Post by: Ben Rose on April 11, 2019, 02:42:50 PM
I gave this a try on my computer and it seems to be working- if you're using TinyDuino, do you have the ATmega328p 8MHz processor selection picked? The tutorial seems to skip over board selection, I'll make a note of that. We're in the process of reworking our tutorial section.

If you did have the right processor selection, let me know what IDE version and operating system you're on so I can try to duplicate the issue.

Thanks,
Ben