Skip to content

Instantly share code, notes, and snippets.

@southwolf
Created September 13, 2013 01:49
Show Gist options
  • Save southwolf/6546017 to your computer and use it in GitHub Desktop.
Save southwolf/6546017 to your computer and use it in GitHub Desktop.
#include <string.h>
#include <ctype.h>
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};
const uint8_t sms[23] = {0x00, 0x13, 0x0b, 0xb8, 0x01, 0x01, 0x41, 0x01, 0x42, 0x0d, 0x31, 0x33, 0x37, 0x36, 0x34, 0x36, 0x36, 0x36, 0x35, 0x39, 0x30, 0x30, 0x30};
//uint8_t serialMessage[200];
int index = 0;
bool isMessage = false;
void setup()
{
//for(int i=0;i<200;i++)
//serialMessage[i] = 0;
Serial.begin(115200);
//Serial1.setTimeout(50);
Serial1.begin(9600); // BT
Serial.println("Arduino - Pebble Test");
}
void loop()
{
//if(isMessage)
//{
// for(int i=0;i<20;i++)
// {
// Serial.print(serialMessage[i]);
// Serial.print(" ");
// }
//}
}
void serialEvent1()
{
while(Serial1.available())
{
//uint8_t byte = (uint8_t)Serial1.read();
//serialMessage[index] = byte;
//index ++;
}
//isMessage = true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment