TinyCircuits

BLE Board sample code

BLE Board sample code
« on: September 14, 2013, 11:54:03 PM »
Hi, I've followed the code on https://github.com/jrowberg/bglib/tree/master/Arduino

However, it seems like the ble shield is not responding to the commands. I'm wondering if there is any difference for Tinyduino especially in the pin numbers:

SoftwareSerial bleSerialPort(2, 3); // RX, TX
BGLib ble112((HardwareSerial *)&bleSerialPort, 0, 1);
#define LED_PIN 13          // Arduino Uno LED
#define BLE_WAKEUP_PIN 5    // Assuming digital pin 5 is connected to BLE wake-up pin (P1_6 in my firmware)

I'm really new to programming on arduino and any help would be greatly appreciated. Thanks!

Re: BLE Board sample code
« Reply #1 on: September 23, 2013, 02:04:01 PM »
There are a few differences needed to get this to work, check out the section under Learn on our website for the BLE board, this includes some instructions and sample code on getting the BLE to work.

http://tiny-circuits.com/learn/using-the-bluetooth-low-energy-tinyshield/

Thanks,

Ken Burns
TinyCircuits


Re: BLE Board sample code
« Reply #2 on: March 26, 2014, 06:21:56 PM »
also a newbie, to the extent that i'm even unsure as to which of these applies to the TD BT LE,


THIS SCRIPT WILL NOT COMMUNICATE PROPERLY IF YOU DO NOT ENSURE ONE OF THE
   FOLLOWING IS TRUE:

   1. You enable the <wakeup_pin> functionality in your firmware

   2. You COMMENT OUT the two lines 128 and 129 below which depend on wake-up
      funcitonality to work properly (they will BLOCK otherwise):

          ble112.onBeforeTXCommand = onBeforeTXCommand;
          ble112.onTXCommandComplete = onTXCommandComplete;


https://github.com/jrowberg/bglib/blob/master/Arduino/Examples/BGLib_stub_slave/BGLib_stub_slave.ino

Re: BLE Board sample code
« Reply #3 on: April 30, 2014, 11:49:41 PM »
Hello,

I cant get this to work also. I was very disappointed to find out after long hours of debugging that the R6 and R7 resisters where not populated. After adding them I still cant get this to work. I have verified that I get data to the BLE112 and it responds with something. Im using a baud rate of 38400 like the example for both the PC and the BLE. I'm using the following for BLE comm pins bleSerialPort(3, 4). What software do your modules have loaded? Does it support the ble_cmd_system_hello() function? I cant seem even get this to work. I figured when I bought this I would get up and running quickly, but this has been very very disappointing, could you help?

Luis