USB TinyShield and Bluetooth

r33fer · 7 · 1348

r33fer

  • Newbie
  • *
    • Posts: 1
    • View Profile
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?


lennevia

  • Administrator
  • Sr. Member
  • *****
    • Posts: 87
    • View Profile
Is the baud rate in the program .ino and the Serial Monitor the same?


loaf

  • Newbie
  • *
    • Posts: 2
    • View Profile
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


loaf

  • Newbie
  • *
    • Posts: 2
    • View Profile
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


digital1440

  • Newbie
  • *
    • Posts: 1
    • View Profile
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?


Chicadian

  • Newbie
  • *
    • Posts: 1
    • View Profile
    • live camslurp
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?


Ben Rose

  • Administrator
  • Hero Member
  • *****
    • Posts: 342
    • View Profile
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


 

SMF spam blocked by CleanTalk