Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Arduino code for Communicate with Pebble
#include <string.h>
#include <ctype.h>
#include <SoftwareSerial.h>
// the Bluetooth Shield connects to Pin D9 & D10
SoftwareSerial bt(9,10);
const uint8_t req[5] = {0x00, 0x01, 0x00, 0x11, 0x00};
const uint8_t cap[17] = {0x00, 0x0d, 0x00, 0x11, 0x01, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32};
const uint8_t ping[9] = {0x00, 0x05, 0x07, 0xd1, 0x00, 0xde, 0xad, 0xbe, 0xef};
void setup()
Serial.println("Arduino - Pebble Test");
void loop()
int i = 0;
bool is_req = false;
// After connected with Arduino, Pebble sends a 5 bytes request asking for "Phone Version"
// We make a fake answer to Pebble so that Pebble takes our arduino as an "android phone"
// For details, check
for(i = 0;i < 5; i++)
int sig =;
if(req[i] != sig)
is_req = true;
bt.write(cap, 17);
bt.write(ping, 9);

This comment has been minimized.

Show comment
Hide comment

soulslicer Sep 29, 2013

Where do i enter the pebbles Bluetooth ID?

Where do i enter the pebbles Bluetooth ID?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment