BLE Board sample code

khankuan

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


TinyCircuits

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



projectfungus

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


comlou

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


 

SMF spam blocked by CleanTalk