Skip to content

Instantly share code, notes, and snippets.

View XuGuohui's full-sized avatar
💭
I may be slow to respond.

XuGuohui XuGuohui

💭
I may be slow to respond.
View GitHub Profile
@XuGuohui
XuGuohui / BLEController.ino
Created August 30, 2014 03:32
Lost data when sending data to Lightblue
// Import libraries (BLEPeripheral depends on SPI)
#include <SPI.h>
#include <BLEPeripheral.h>
#include <Servo.h>
#include "Boards.h"
// define pins (varies per shield/board)
#define BLE_REQ 6
#define BLE_RDY 7
#define BLE_RST 4
@XuGuohui
XuGuohui / SimpleChat.ino
Created August 30, 2014 03:20
Can not send/receive data to/from LightBlue
// Import libraries (BLEPeripheral depends on SPI)
#include <SPI.h>
#include <BLEPeripheral.h>
// define pins (varies per shield/board)
#define BLE_REQ 6
#define BLE_RDY 7
#define BLE_RST 4
/*----- BLE Utility -------------------------------------------------------------------------*/
@XuGuohui
XuGuohui / CannotNotify.ino
Created August 15, 2014 02:05
Can not notify data to central
// Import libraries (BLEPeripheral depends on SPI)
#include <SPI.h>
#include <BLEPeripheral.h>
// define pins (varies per shield/board)
#define BLE_REQ 6
#define BLE_RDY 7
#define BLE_RST 4
// create peripheral instance, see pinouts above
@XuGuohui
XuGuohui / CharacteristicAddFail.ino
Created August 15, 2014 01:56
Can not add more than one characteristic
// Import libraries (BLEPeripheral depends on SPI)
#include <SPI.h>
#include <BLEPeripheral.h>
// define pins (varies per shield/board)
#define BLE_REQ 6
#define BLE_RDY 7
#define BLE_RST 4
// create peripheral instance, see pinouts above
@XuGuohui
XuGuohui / ServiceNotFound.ino
Created August 15, 2014 01:44
Service not found when set characteristic's length to 3 bytes
// Import libraries (BLEPeripheral depends on SPI)
#include <SPI.h>
#include <BLEPeripheral.h>
// define pins (varies per shield/board)
#define BLE_REQ 6
#define BLE_RDY 7
#define BLE_RST 4
// create peripheral instance, see pinouts above