[
  {
    "path": "config.json",
    "content": "{\n  \"bridge\": {\n    \"name\": \"Raspberry Pi 3\",\n    \"username\": \"CC:22:3D:E3:CE:30\",\n    \"port\": 51826,\n    \"pin\": \"031-45-154\"\n  },\n  \"description\": \"Raspberry Pi 3 Homebridge-Bluetooth Example\",\n\n  \"platforms\": [\n    {\n      \"platform\": \"Bluetooth\",\n      \"accessories\": [\n        {\n          \"name\": \"Arduino 101\",\n          \"name_note\": \"Name of the accessory as shown in the Home app on iOS.\",\n\n          \"address\": \"01:23:45:67:89:AB\",\n          \"address_note\": \"Bluetooth address of the accessory. Non-matching devices are ignored.\",\n\n          \"services\": [\n            {\n              \"name\": \"LED 13\",\n              \"name_note\": \"Name of the service as shown in the Home app on iOS.\",\n\n              \"type\": \"Lightbulb\",\n              \"type_note1\": \"Type of the service - i.e. Lightbulb, Switch, Lock, HumiditySensor, ...\",\n              \"type_note2\": \"Must match this list - https://github.com/KhaosT/HAP-NodeJS/blob/master/lib/gen/HomeKitTypes.js\",\n              \"type_note3\": \"Service.Lightbulb has a mandatory On characteristic and Brightness, Hue and Saturation are optional.\",\n\n              \"UUID\": \"A7B10010-EEEE-5377-FF6C-D104768A1214\",\n              \"UUID_note\": \"Bluetooth UUID of the service. Capitalization and dashes doesn't matter.\",\n\n              \"characteristics\": [\n                {\n                  \"type\": \"On\",\n                  \"type_note1\": \"Type of the characteristic - i.e. On, Brightness, CurrentHumidity, CurrentTemperature, ...\",\n                  \"type_note2\": \"Must match this list - https://github.com/KhaosT/HAP-NodeJS/blob/master/lib/gen/HomeKitTypes.js\",\n                  \"type_note3\": \"Characteristic.On is a BOOL value and expects READ, WRITE and NOTIFY permissions.\",\n\n                  \"UUID\": \"A7B10010-EEEE-5377-FF6C-D104768A1214\",\n                  \"UUID_note\": \"Bluetooth UUID of the characteristic. Capitalization and dashes doesn't matter.\"\n                },\n\n                {\n                  \"type\": \"Brightness\",\n                  \"type_note1\": \"Type of the characteristic - i.e. On, Brightness, CurrentHumidity, CurrentTemperature, ...\",\n                  \"type_note2\": \"Must match this list - https://github.com/KhaosT/HAP-NodeJS/blob/master/lib/gen/HomeKitTypes.js\",\n                  \"type_note3\": \"Characteristic.Brightness is an INT value and expects READ, WRITE and NOTIFY permissions.\",\n\n                  \"UUID\": \"A7B10012-EEEE-5377-FF6C-D104768A1214\",\n                  \"UUID_note\": \"Bluetooth UUID of the characteristic. Capitalization and dashes doesn't matter.\"\n                }\n              ],\n              \"characteristics_note1\": \"List of Bluetooth characteristics that will be exposed to HomeKit.\",\n              \"characteristics_note2\": \"Characteristics with non-matching UUIDs are ignored.\"\n            }\n\n          ],\n          \"services_note1\": \"List of Bluetooth services that will be exposed to HomeKit.\",\n          \"services_note2\": \"Services with non-matching UUIDs are ignored.\"\n        }\n      ]\n    }\n  ]\n}\n"
  },
  {
    "path": "examples/humidity/arduino101/Si7021.cpp",
    "content": "/**************************************************************************\n  @file   Si7021.cpp\n  @author   Limor Fried (Adafruit Industries), Vojta Molda\n  @license  BSD (see license.txt)\n \n  This is a library for the Adafruit Si7021 breakout board\n  ----> https://www.adafruit.com/products/3251\n \n  Adafruit invests time and resources providing this open source code,\n  please support Adafruit and open-source hardware by purchasing\n  products from Adafruit!\n \n  @section  HISTORY\n   v1.0  - First release\n   v1.1  - Modified to use <SoftWire.h>\n**************************************************************************/\n\n#include \"Si7021.h\"\n\n\nSi7021::Si7021(SoftwareWire& Wire_) :\n   sernum_a(0), sernum_b(0), Wire(Wire_)\n{ }\n\nbool Si7021::begin(void) {\n  Wire.begin();\n  \n  reset();\n  if (readRegister8(Si7021::Cmd.READRHT_REG) != 0x3A) return false;\n  readSerialNumber();\n  return true;\n}\n\nfloat Si7021::readHumidity(void) {\n  Wire.beginTransmission(Si7021::Cmd.ADDRESS);\n  Wire.write(Si7021::Cmd.MEASRH_NOHOLD);\n  Wire.endTransmission(false);\n  delay(25);\n  \n  Wire.requestFrom(Si7021::Cmd.ADDRESS, (uint8_t)3);\n  uint16_t hum = Wire.read();\n  hum <<= 8;\n  hum |= Wire.read();\n  uint8_t chxsum = Wire.read();\n  \n  float humidity = hum;\n  humidity *= 125;\n  humidity /= 65536;\n  humidity -= 6;\n  \n  return humidity;\n}\n\nfloat Si7021::readTemperature(void) {\n  Wire.beginTransmission(Si7021::Cmd.ADDRESS);\n  Wire.write(Si7021::Cmd.MEASTEMP_NOHOLD);\n  Wire.endTransmission(false);\n  delay(25);\n  \n  Wire.requestFrom(Si7021::Cmd.ADDRESS, (uint8_t)3);\n  uint16_t temp = Wire.read();\n  temp <<= 8;\n  temp |= Wire.read();\n  uint8_t chxsum = Wire.read();\n  \n  float temperature = temp;\n  temperature *= 175.72;\n  temperature /= 65536;\n  temperature -= 46.85;\n  \n  return temperature;\n}\n\nvoid Si7021::reset(void) {\n  Wire.beginTransmission(Si7021::Cmd.ADDRESS);\n  Wire.write(Si7021::Cmd.RESET);\n  Wire.endTransmission();\n  delay(50);\n}\n\nvoid Si7021::readSerialNumber(void) {\n  Wire.beginTransmission(Si7021::Cmd.ADDRESS);\n  Wire.write(Si7021::Cmd.ID1 >> 8);\n  Wire.write(Si7021::Cmd.ID1 & 0xFF);\n  Wire.endTransmission();\n  \n  Wire.requestFrom(Si7021::Cmd.ADDRESS, (uint8_t)8);\n  sernum_a = Wire.read();\n  Wire.read();\n  sernum_a <<= 8;\n  sernum_a |= Wire.read();\n  Wire.read();\n  sernum_a <<= 8;\n  sernum_a |= Wire.read();\n  Wire.read();\n  sernum_a <<= 8;\n  sernum_a |= Wire.read();\n  Wire.read();\n  \n  Wire.beginTransmission(Si7021::Cmd.ADDRESS);\n  Wire.write(Si7021::Cmd.ID2 >> 8);\n  Wire.write(Si7021::Cmd.ID2 & 0xFF);\n  Wire.endTransmission();\n  \n  Wire.requestFrom(Si7021::Cmd.ADDRESS, (uint8_t)8);\n  sernum_b = Wire.read();\n  Wire.read();\n  sernum_b <<= 8;\n  sernum_b |= Wire.read();\n  Wire.read();\n  sernum_b <<= 8;\n  sernum_b |= Wire.read();\n  Wire.read();\n  sernum_b <<= 8;\n  sernum_b |= Wire.read();\n  Wire.read();\n}\n\n\nvoid Si7021::writeRegister8(uint8_t reg, uint8_t value) {\n  Wire.beginTransmission(Si7021::Cmd.ADDRESS);\n  Wire.write(reg);\n  Wire.write(value);\n  Wire.endTransmission();\n}\n\nuint8_t Si7021::readRegister8(uint8_t reg) {\n  uint8_t value;\n  Wire.beginTransmission(Si7021::Cmd.ADDRESS);\n  Wire.write(reg);\n  Wire.endTransmission(false);\n  \n  Wire.requestFrom(Si7021::Cmd.ADDRESS, (uint8_t)1);\n  value = Wire.read();\n  \n  return value;\n}\n\nuint16_t Si7021::readRegister16(uint8_t reg) {\n  uint16_t value;\n  Wire.beginTransmission(Si7021::Cmd.ADDRESS);\n  Wire.write(reg);\n  Wire.endTransmission();\n  \n  Wire.requestFrom(Si7021::Cmd.ADDRESS, (uint8_t)2);\n  value = Wire.read();\n  value <<= 8;\n  value |= Wire.read();\n  \n  return value;\n}\n"
  },
  {
    "path": "examples/humidity/arduino101/Si7021.h",
    "content": "#ifndef _SI7021_H_\n#define _SI7021_H_\n\n/**************************************************************************\n  @file   Si7021.cpp\n  @author   Limor Fried (Adafruit Industries), Vojta Molda\n  @license  BSD (see license.txt)\n \n  This is a library for the Adafruit Si7021 breakout board\n  ----> https://www.adafruit.com/products/3251\n \n  Adafruit invests time and resources providing this open source code,\n  please support Adafruit and open-source hardware by purchasing\n  products from Adafruit!\n \n  @section  HISTORY\n   v1.0  - First release\n   v1.1  - Modified to use <SoftWire.h>\n**************************************************************************/\n\n#include <Arduino.h>\n#include <SoftwareWire.h>\n\n\nclass Si7021 {\n  \n  public:\n  \n  Si7021(SoftwareWire& Wire_);\n  bool begin(void);\n  void reset(void);\n  void readSerialNumber(void);\n  float readTemperature(void);\n  float readHumidity(void);\n  uint32_t sernum_a, sernum_b;\n  \n  \n  private:\n\n  uint8_t readRegister8(uint8_t reg);\n  uint16_t readRegister16(uint8_t reg);\n  void writeRegister8(uint8_t reg, uint8_t value);\n\n  SoftwareWire& Wire;\n  const static struct WireCommands {\n    static const uint8_t ADDRESS = 0x40;\n    static const uint8_t MEASRH_HOLD = 0xE5;\n    static const uint8_t MEASRH_NOHOLD = 0xF5;\n    static const uint8_t MEASTEMP_HOLD = 0xE3;\n    static const uint8_t MEASTEMP_NOHOLD = 0xF3;\n    static const uint8_t READPREVTEMP = 0xE0;\n    static const uint8_t RESET = 0xFE;\n    static const uint8_t WRITERHT_REG = 0xE6;\n    static const uint8_t READRHT_REG = 0xE7;\n    static const uint8_t WRITEHEATER_REG = 0x51;\n    static const uint8_t READHEATER_REG = 0x11;\n    static const uint16_t ID1 = 0xFA0F;\n    static const uint16_t ID2 = 0xFCC9;\n    static const uint16_t FIRMVERS = 0x84B8;\n  } Cmd;\n  \n};\n\n#endif\n\n"
  },
  {
    "path": "examples/humidity/arduino101/arduino101.ino",
    "content": "#include <Arduino.h>\n#include <CurieBLE.h>\n#include <SoftwareWire.h>\n#include \"Si7021.h\"\n\nstatic struct BoardPins {\n  const uint8_t VIN = A0;\n  const uint8_t VO3 = A1;\n  const uint8_t GND = A2;\n  const uint8_t SCL = A3;\n  const uint8_t SDA = A4;\n} Pin;\n\nSoftwareWire wire = SoftwareWire(Pin.SDA, Pin.SCL);\nSi7021 sensor = Si7021(wire);\n\nBLEPeripheral ble;\nBLEService informationService(\"180A\");\nBLECharacteristic modelCharacteristic(\"2A24\", BLERead, \"101\");\nBLECharacteristic manufacturerCharacteristic(\"2A29\", BLERead, \"Arduino\");\nBLECharacteristic serialNumberCharacteristic(\"2A25\", BLERead, \"2.71828\");\n\nBLEService humidityService(\"10525F60-CF73-11E6-9598-F8E2251C9A69\");\nBLEFloatCharacteristic humidityCharacteristic(\"10525F61-CF73-11E6-9598-F8E2251C9A69\", BLERead | BLENotify);\nBLEService thermometerService(\"F489CB00-C177-11E6-9598-9854249C9A66\");\nBLEFloatCharacteristic temperatureCharacteristic(\"F489CB01-C177-11E6-9598-9854249C9A66\", BLERead | BLENotify);\n\n\nvoid setup() {\n  Serial.begin(115200);\n\n  pinMode(Pin.VIN, OUTPUT);\n  digitalWrite(Pin.VIN, HIGH);\n  pinMode(Pin.GND, OUTPUT);\n  digitalWrite(Pin.GND, LOW);\n  sensor.begin();\n\n  ble.setLocalName(\"Humidity\");\n  ble.setAdvertisedServiceUuid(thermometerService.uuid());\n  ble.addAttribute(informationService);\n  ble.addAttribute(modelCharacteristic);\n  ble.addAttribute(manufacturerCharacteristic);\n  ble.addAttribute(serialNumberCharacteristic);\n\n  ble.addAttribute(humidityService);\n  ble.addAttribute(humidityCharacteristic);\n  humidityCharacteristic.setValueLE(0.0);\n  ble.addAttribute(thermometerService);\n  ble.addAttribute(temperatureCharacteristic);\n  temperatureCharacteristic.setValueLE(0.0);\n\n  ble.setEventHandler(BLEConnected, centralConnect);\n  ble.setEventHandler(BLEDisconnected, centralDisconnect);\n\n  ble.begin();\n  Serial.println(\"Bluetooth on\");\n}\n\nvoid loop() {\n  ble.poll();\n\n  static float averageHumidity = sensor.readHumidity();\n  averageHumidity += (sensor.readTemperature() - averageHumidity) / 30.0;\n  float previousHumidity = humidityCharacteristic.valueLE();\n  if (abs(averageHumidity - previousHumidity) > 1.50) {\n    humidityCharacteristic.setValueLE(averageHumidity);\n    Serial.print(\"Update temperature | \");\n    Serial.println(averageHumidity, 0);\n  } else {\n    Serial.print(\"Temperature | \");\n    Serial.println(averageHumidity, 0);\n  }\n\n  static float averageCelsius = sensor.readTemperature();\n  averageCelsius += (sensor.readTemperature() - averageCelsius) / 30.0;\n  float previousCelsius = temperatureCharacteristic.valueLE();\n  if (abs(averageCelsius - previousCelsius) > 0.20) {\n    temperatureCharacteristic.setValueLE(averageCelsius);\n    Serial.print(\"Update temperature | \");\n    Serial.println(averageCelsius, 2);\n  } else {\n    Serial.print(\"Temperature | \");\n    Serial.println(averageCelsius, 2);\n  }\n\n  delay(1000);\n}\n\n\nvoid centralConnect(BLECentral& central) {\n  Serial.print(\"Central connected | \");\n  Serial.println(central.address());\n}\n\nvoid centralDisconnect(BLECentral& central) {\n  Serial.print(\"Central disconnected | \");\n  Serial.println(central.address());\n}\n"
  },
  {
    "path": "examples/humidity/bluefruit/Si7021.cpp",
    "content": "/**************************************************************************\n  @file   Si7021.cpp\n  @author   Limor Fried (Adafruit Industries), Vojta Molda\n  @license  BSD (see license.txt)\n \n  This is a library for the Adafruit Si7021 breakout board\n  ----> https://www.adafruit.com/products/3251\n \n  Adafruit invests time and resources providing this open source code,\n  please support Adafruit and open-source hardware by purchasing\n  products from Adafruit!\n \n  @section  HISTORY\n   v1.0  - First release\n   v1.1  - Modified to use <SoftWire.h>\n**************************************************************************/\n\n#include \"Si7021.h\"\n\n\nSi7021::Si7021(SoftwareWire& Wire_) :\n   sernum_a(0), sernum_b(0), Wire(Wire_)\n{ }\n\nbool Si7021::begin(void) {\n  Wire.begin();\n  \n  reset();\n  if (readRegister8(Si7021::Cmd.READRHT_REG) != 0x3A) return false;\n  readSerialNumber();\n  return true;\n}\n\nfloat Si7021::readHumidity(void) {\n  Wire.beginTransmission(Si7021::Cmd.ADDRESS);\n  Wire.write(Si7021::Cmd.MEASRH_NOHOLD);\n  Wire.endTransmission(false);\n  delay(25);\n  \n  Wire.requestFrom(Si7021::Cmd.ADDRESS, (uint8_t)3);\n  uint16_t hum = Wire.read();\n  hum <<= 8;\n  hum |= Wire.read();\n  uint8_t chxsum = Wire.read();\n  \n  float humidity = hum;\n  humidity *= 125;\n  humidity /= 65536;\n  humidity -= 6;\n  \n  return humidity;\n}\n\nfloat Si7021::readTemperature(void) {\n  Wire.beginTransmission(Si7021::Cmd.ADDRESS);\n  Wire.write(Si7021::Cmd.MEASTEMP_NOHOLD);\n  Wire.endTransmission(false);\n  delay(25);\n  \n  Wire.requestFrom(Si7021::Cmd.ADDRESS, (uint8_t)3);\n  uint16_t temp = Wire.read();\n  temp <<= 8;\n  temp |= Wire.read();\n  uint8_t chxsum = Wire.read();\n  \n  float temperature = temp;\n  temperature *= 175.72;\n  temperature /= 65536;\n  temperature -= 46.85;\n  \n  return temperature;\n}\n\nvoid Si7021::reset(void) {\n  Wire.beginTransmission(Si7021::Cmd.ADDRESS);\n  Wire.write(Si7021::Cmd.RESET);\n  Wire.endTransmission();\n  delay(50);\n}\n\nvoid Si7021::readSerialNumber(void) {\n  Wire.beginTransmission(Si7021::Cmd.ADDRESS);\n  Wire.write(Si7021::Cmd.ID1 >> 8);\n  Wire.write(Si7021::Cmd.ID1 & 0xFF);\n  Wire.endTransmission();\n  \n  Wire.requestFrom(Si7021::Cmd.ADDRESS, (uint8_t)8);\n  sernum_a = Wire.read();\n  Wire.read();\n  sernum_a <<= 8;\n  sernum_a |= Wire.read();\n  Wire.read();\n  sernum_a <<= 8;\n  sernum_a |= Wire.read();\n  Wire.read();\n  sernum_a <<= 8;\n  sernum_a |= Wire.read();\n  Wire.read();\n  \n  Wire.beginTransmission(Si7021::Cmd.ADDRESS);\n  Wire.write(Si7021::Cmd.ID2 >> 8);\n  Wire.write(Si7021::Cmd.ID2 & 0xFF);\n  Wire.endTransmission();\n  \n  Wire.requestFrom(Si7021::Cmd.ADDRESS, (uint8_t)8);\n  sernum_b = Wire.read();\n  Wire.read();\n  sernum_b <<= 8;\n  sernum_b |= Wire.read();\n  Wire.read();\n  sernum_b <<= 8;\n  sernum_b |= Wire.read();\n  Wire.read();\n  sernum_b <<= 8;\n  sernum_b |= Wire.read();\n  Wire.read();\n}\n\n\nvoid Si7021::writeRegister8(uint8_t reg, uint8_t value) {\n  Wire.beginTransmission(Si7021::Cmd.ADDRESS);\n  Wire.write(reg);\n  Wire.write(value);\n  Wire.endTransmission();\n}\n\nuint8_t Si7021::readRegister8(uint8_t reg) {\n  uint8_t value;\n  Wire.beginTransmission(Si7021::Cmd.ADDRESS);\n  Wire.write(reg);\n  Wire.endTransmission(false);\n  \n  Wire.requestFrom(Si7021::Cmd.ADDRESS, (uint8_t)1);\n  value = Wire.read();\n  \n  return value;\n}\n\nuint16_t Si7021::readRegister16(uint8_t reg) {\n  uint16_t value;\n  Wire.beginTransmission(Si7021::Cmd.ADDRESS);\n  Wire.write(reg);\n  Wire.endTransmission();\n  \n  Wire.requestFrom(Si7021::Cmd.ADDRESS, (uint8_t)2);\n  value = Wire.read();\n  value <<= 8;\n  value |= Wire.read();\n  \n  return value;\n}\n"
  },
  {
    "path": "examples/humidity/bluefruit/Si7021.h",
    "content": "#ifndef _SI7021_H_\n#define _SI7021_H_\n\n/**************************************************************************\n  @file   Si7021.cpp\n  @author   Limor Fried (Adafruit Industries), Vojta Molda\n  @license  BSD (see license.txt)\n \n  This is a library for the Adafruit Si7021 breakout board\n  ----> https://www.adafruit.com/products/3251\n \n  Adafruit invests time and resources providing this open source code,\n  please support Adafruit and open-source hardware by purchasing\n  products from Adafruit!\n \n  @section  HISTORY\n   v1.0  - First release\n   v1.1  - Modified to use <SoftWire.h>\n**************************************************************************/\n\n#include <Arduino.h>\n#include <SoftwareWire.h>\n\n\nclass Si7021 {\n  \n  public:\n  \n  Si7021(SoftwareWire& Wire_);\n  bool begin(void);\n  void reset(void);\n  void readSerialNumber(void);\n  float readTemperature(void);\n  float readHumidity(void);\n  uint32_t sernum_a, sernum_b;\n  \n  \n  private:\n\n  uint8_t readRegister8(uint8_t reg);\n  uint16_t readRegister16(uint8_t reg);\n  void writeRegister8(uint8_t reg, uint8_t value);\n\n  SoftwareWire& Wire;\n  const static struct WireCommands {\n    static const uint8_t ADDRESS = 0x40;\n    static const uint8_t MEASRH_HOLD = 0xE5;\n    static const uint8_t MEASRH_NOHOLD = 0xF5;\n    static const uint8_t MEASTEMP_HOLD = 0xE3;\n    static const uint8_t MEASTEMP_NOHOLD = 0xF3;\n    static const uint8_t READPREVTEMP = 0xE0;\n    static const uint8_t RESET = 0xFE;\n    static const uint8_t WRITERHT_REG = 0xE6;\n    static const uint8_t READRHT_REG = 0xE7;\n    static const uint8_t WRITEHEATER_REG = 0x51;\n    static const uint8_t READHEATER_REG = 0x11;\n    static const uint16_t ID1 = 0xFA0F;\n    static const uint16_t ID2 = 0xFCC9;\n    static const uint16_t FIRMVERS = 0x84B8;\n  } Cmd;\n  \n};\n\n#endif\n\n"
  },
  {
    "path": "examples/humidity/bluefruit/bluefruit.ino",
    "content": "#include <SPI.h>\n#include <Arduino.h>\n\n#include <Adafruit_BLE.h>\n#include <Adafruit_BLEGatt.h>\n#include <Adafruit_BluefruitLE_SPI.h>\n\n#include \"Si7021.h\"\n\nstatic struct BoardPins {\n  const uint8_t VIN = A0;\n  const uint8_t VO3 = A1;\n  const uint8_t GND = A2;\n  const uint8_t SCL = A3;\n  const uint8_t SDA = A4;\n} Pin;\n\nSoftwareWire wire = SoftwareWire(Pin.SDA, Pin.SCL);\nSi7021 sensor = Si7021(wire);\n\nAdafruit_BluefruitLE_SPI ble(8, 7, 4); // Firmware > 0.7.0\nAdafruit_BLEGatt gatt(ble);\nint32_t humidityService;\nint32_t humidityCharacteristic;\nint32_t thermometerService;\nint32_t temperatureCharacteristic;\n\nunion float_bytes {\n  float value;\n  uint8_t bytes[sizeof(float)];\n};\n\n\nvoid setup(void) {\n  Serial.begin(115200);\n\n  pinMode(Pin.VIN, OUTPUT);\n  digitalWrite(Pin.VIN, HIGH);\n  pinMode(Pin.GND, OUTPUT);\n  digitalWrite(Pin.GND, LOW);\n  sensor.begin();\n\n  ble.begin(/* true - useful for debugging */);\n  ble.factoryReset();\n  ble.info();\n\n  uint8_t humidityServiceUUID[] = {0x10,0x52,0x5F,0x60,0xCF,0x73,0x11,0xE6,0x95,0x98,0xF8,0xE2,0x25,0x1C,0x9A,0x69};\n  humidityService = gatt.addService(humidityServiceUUID);\n  uint8_t humidityCharacteristicUUID[] = {0x10,0x52,0x5F,0x61,0xCF,0x73,0x11,0xE6,0x95,0x98,0xF8,0xE2,0x25,0x1C,0x9A,0x69};\n  humidityCharacteristic = gatt.addCharacteristic(humidityCharacteristicUUID,\n                                                  GATT_CHARS_PROPERTIES_READ | GATT_CHARS_PROPERTIES_NOTIFY,\n                                                  sizeof(float), sizeof(float), BLE_DATATYPE_BYTEARRAY);\n\n  uint8_t thermometerServiceUUID[] = {0xF4,0x89,0xCB,0x00,0xC1,0x77,0x11,0xE6,0x95,0x98,0x98,0x54,0x24,0x9C,0x9A,0x66};\n  thermometerService = gatt.addService(thermometerServiceUUID);\n  uint8_t thermometerCharacteristicUUID[] = {0xF4,0x89,0xCB,0x01,0xC1,0x77,0x11,0xE6,0x95,0x98,0x98,0x54,0x24,0x9C,0x9A,0x66};\n  temperatureCharacteristic = gatt.addCharacteristic(thermometerCharacteristicUUID,\n                                                     GATT_CHARS_PROPERTIES_READ | GATT_CHARS_PROPERTIES_NOTIFY,\n                                                     sizeof(float), sizeof(float), BLE_DATATYPE_BYTEARRAY);\n\n  ble.reset();\n  ble.setConnectCallback(centralConnect);\n  ble.setDisconnectCallback(centralDisconnect);\n  Serial.println(\"Bluetooth on\");\n}\n\n/** Send randomized heart rate data continuously **/\nvoid loop(void) {\n  ble.update();\n\n  static union float_bytes averageHumidity = { .value = sensor.readHumidity() };\n  averageHumidity.value += (sensor.readHumidity() - averageHumidity.value) / 30.0;\n  static union float_bytes previousHumidity = { .value = 0.0 };\n  gatt.getChar(humidityCharacteristic, previousHumidity.bytes, sizeof(previousHumidity));\n\n  if (abs(averageHumidity.value - previousHumidity.value) > 1.5) {\n    gatt.setChar(humidityCharacteristic, averageHumidity.bytes, sizeof(averageHumidity));\n    Serial.print(\"Update humidity | \");\n    Serial.println(averageHumidity.value, 0);\n  } else {\n    Serial.print(\"Humidity | \");\n    Serial.println(averageHumidity.value, 0);\n  }\n\n  static union float_bytes averageCelsius = { .value = sensor.readTemperature()};\n  averageCelsius.value += (sensor.readTemperature() - averageCelsius.value) / 30.0;\n  static union float_bytes previousCelsius = { .value = 0.0 };\n  gatt.getChar(temperatureCharacteristic, previousCelsius.bytes, sizeof(previousCelsius));\n\n  if (abs(averageCelsius.value - previousCelsius.value) > 0.20) {\n    gatt.setChar(temperatureCharacteristic, averageCelsius.bytes, sizeof(averageCelsius));\n    Serial.print(\"Update temperature | \");\n    Serial.println(averageCelsius.value, 2);\n  } else {\n    Serial.print(\"Temperature | \");\n    Serial.println(averageCelsius.value, 2);\n  }\n\n  delay(1000);\n}\n\n\nvoid centralConnect(void) {\n  Serial.print(\"Central connected | \");\n  if (ble.sendCommandCheckOK(\"AT+BLEGETPEERADDR\")) {\n    Serial.println(ble.buffer);\n  }\n}\n\nvoid centralDisconnect(void) {\n  Serial.print(\"Central disconnected | \");\n  if (ble.sendCommandCheckOK(\"AT+BLEGETPEERADDR\")) {\n    Serial.println(ble.buffer);\n  }\n}\n"
  },
  {
    "path": "examples/humidity/config.json",
    "content": "{\n  \"bridge\": {\n    \"name\": \"Raspberry Pi 3\",\n    \"username\": \"CC:22:3D:E3:CE:30\",\n    \"port\": 51826,\n    \"pin\": \"314-15-926\"\n  },\n  \"description\": \"Raspberry Pi 3 Homebridge-Bluetooth Humidity Sensor Example\",\n  \"platforms\": [\n    {\n      \"platform\": \"Bluetooth\",\n      \"accessories\": [\n        {\n          \"name\": \"Arduino\",\n          \"address\": \"01:23:45:67:89:AB\",\n          \"services\": [\n            {\n              \"name\": \"Humidity Sensor\",\n              \"type\": \"HumiditySensor\",\n              \"UUID\": \"10525F60-CF73-11E6-9598-F8E2251C9A69\",\n              \"characteristics\": [\n                {\n                  \"type\": \"CurrentRelativeHumidity\",\n                  \"UUID\": \"10525F61-CF73-11E6-9598-F8E2251C9A69\"\n                }\n              ]\n            },\n            {\n              \"name\": \"Temperature Sensor\",\n              \"type\": \"TemperatureSensor\",\n              \"UUID\": \"F489CB00-C177-11E6-9598-9854249C9A66\",\n              \"characteristics\": [\n                {\n                  \"type\": \"CurrentTemperature\",\n                  \"UUID\": \"F489CB01-C177-11E6-9598-9854249C9A66\"\n                }\n              ]\n            }\n          ]\n        }\n      ]\n    }\n  ]\n}\n"
  },
  {
    "path": "examples/humidity/readme.md",
    "content": "\n# Humidity and Temperature Sensor\n\n\nTurn a BLE capable microprocessor and the [Si7021](https://www.silabs.com/Support%20Documents/TechnicalDocs/Si7021-A20.pdf) humidity and temperature sensor into a wireless HomeKit weather station. Temperature and Humidity readings can be displayed in the Home app on your Apple device and used to setup automation rules for your thermostat and humidifier.\n\n<img src=\"images/humidity.jpg\">\n\nThis example uses [Arduino 101](https://www.arduino.cc/en/Main/ArduinoBoard101) or [Bluefruit Micro LE](https://www.adafruit.com/products/2661) and [Raspberry Pi 3](https://www.raspberrypi.org/). Generally, any programmable BLE peripheral and a box capable of running [Node.js](https://nodejs.org) with [Noble](https://github.com/sandeepmistry/noble) will work. You'll also need the Si7021 humidity and temperature sensor. There is a nice breakout done by [Adafruit](https://www.adafruit.com/products/3251) and you can also use another breakout done by [Sparkfun](https://www.sparkfun.com/products/13763).\n\n\n## BLE Periphral (Arduino 101, Bluefruit Micro LE or Other BLE Board)\n\nDownload and install the latest version of the [Arduino IDE](https://www.arduino.cc/en/Main/Software). If you're totally new to microcontrollers take some time to go through an introductory tutorial and learn how to make a LED blink. This will help you to understand how to use the IDE, how to upload a sketch and what is the code actually doing.\n\n### Wiring\nThe Si7021 breakout is wired to ports `A0`-`A4`. `A0` and `A2` are set as outputs `HIGH`/`LOW` and serve as `VCC` and `GND` to provide power to the sensor. Ports `A3` and `A4` serve as two wire interface data `SDA` and clock `SCL` lines. `A3` is connected to optional `3VO` outptu of the voltage regulator built into the Adafruit's breakout and is not used at all. This pin setup was chosen so the breakout can be soldered directly onto the Bluefruit board to create a small and compact package.\n\n<img src=\"arduino101/arduino101.png\" width=\"30%\">\n<img src=\"bluefruit/bluefruit.png\" width=\"30%\">\n\n\n**Note** _Alternatively, you can use any of the many BLE boards available on the market ([BlueBean](https://punchthrough.com/bean/), [RedBearLabs BLE Nano](http://redbearlab.com/blenano), ...) as long as you keep UUIDs of the services and characteristics in sync with your `config.json` file, everything will work just fine._\n\n### Running the Sketch\nCompile, run and upload the [arduino101.ino](arduino101/arduino101.ino) or [bluefruit.ino](bluefruit/bluefruit.ino) sketch using the [Arduino IDE](https://www.arduino.cc/en/Main/Software). The sketch creates two BLE services with a readable and notifiable characteristic for the current temperature and humidity. Both values are a `float` type.\n\n```cpp\nBLEService humidityService(\"10525F60-CF73-11E6-9598-F8E2251C9A69\");\nBLEFloatCharacteristic humidityCharacteristic(\"10525F61-CF73-11E6-9598-F8E2251C9A69\", BLERead | BLENotify);\nBLEService thermometerService(\"F489CB00-C177-11E6-9598-9854249C9A66\");\nBLEFloatCharacteristic temperatureCharacteristic(\"F489CB01-C177-11E6-9598-9854249C9A66\", BLERead | BLENotify);\n\n```\n\nTake a look into [this file](https://github.com/KhaosT/HAP-NodeJS/blob/master/lib/gen/HomeKitTypes.js#L1147) to see the full definition of the _CurrentRelativeHumidity_ characteristic used in the _HumiditySensor_ service. _TemperatureSensor_ service has _CurrentTemperature_ characteristic. Once the BLE central device is setup, it connects to these characteristics and exposes them via Homebridge as a HomeKit accessory of type _HumiditySensor_ and _TemperatureSensor_.\n\nThe code also calculates (pseudo-moving) average to prevent noise in the measurements to trigger frequent mew value notifications. Duration of the averaging window is about 30 s. Once the moving average accumulates change above a certain threshold a new value of the characteristic is set which triggers the notify mechanism and propagates the measurement to HomeKit. The threshold is approximately half of the sensor accuracy (±0.4°C and ±3%).\n\nLeave the device powered on and the sketch running while you setup the Homebridge server. The sketch has some built-in logging, so keeping the Serial monitor open may be helpful for debugging.\n\n\n## BLE Central & Homebridge Server (Raspberry Pi 3 or Other Compatible Box)\n\nFor help installing an operating system on your new Pi, the official documentation contains a couple of [nice videos](https://www.raspberrypi.org/help/videos/).\n\n### Wiring\nNo wiring except for the micro-USB cable providing power is needed. The Pi needs to be connected to the same router (subnet) as the Apple device you plan to use. It doesn't matter whether via Wifi or Ethernet. Otherwise, you won't be able discover and connect to the Homebridge server running on the Pi.\n\n<img src=\"images/raspberry.png\" width=\"30%\">\n\n**Note** _Alternatively, you can use a Raspberry Pi 2 with a supported USB BLE dongle instead of the Pi 3._\n\n### Running Homebridge\nRunning Homebridge on a Raspberry Pi is straightforward. Follow [this guide](https://github.com/nfarina/homebridge/wiki/Running-HomeBridge-on-a-Raspberry-Pi) to install Homebridge server and then run the following command to install the homebridge-bluetooth plugin:\n\n```sh\n[sudo] npm install -g homebridge-bluetooth\n```\n\nEdit the `~/.homebridge/config.json`, name your Homebridge server and add a new accessory to allow the plugin to connect to the BLE service running on the Arduino:\n\n```js\n\"name\": \"Arduino\",\n\"address\": \"01:23:45:67:89:AB\",\n\"services\": [\n  {\n    \"name\": \"Humidity Sensor\",\n    \"type\": \"HumiditySensor\",\n    \"UUID\": \"10525F60-CF73-11E6-9598-F8E2251C9A69\",\n    \"characteristics\": [\n      {\n        \"type\": \"CurrentRelativeHumidity\",\n        \"UUID\": \"10525F61-CF73-11E6-9598-F8E2251C9A69\"\n      }\n    ]\n  },\n  {\n    \"name\": \"Temperature Sensor\",\n    \"type\": \"TemperatureSensor\",\n    \"UUID\": \"F489CB00-C177-11E6-9598-9854249C9A66\",\n    \"characteristics\": [\n      {\n        \"type\": \"CurrentTemperature\",\n        \"UUID\": \"F489CB01-C177-11E6-9598-9854249C9A66\"\n      }\n    ]\n  }\n]\n```\n\nFinally, start the Homebridge server. If you use Linux you may need to run with higher privileges in order to have access to the BLE hardware layer. See [this link](https://github.com/sandeepmistry/noble#running-without-rootsudo) for more details about running without `sudo`.\n\n```sh\n[sudo] homebridge -D\n```\n\n**Note** _Running with `-D` turns on additional debugging output that is very helpful for getting addresses and UUIDs of your BLE devices that needs to match with the `config.json` file._\n\n<img src=\"images/homebridge.png\">\n\n**Note** _Homebridge server doesn't run only on Linux. MacOS and Windows machines are also supported given they have a built-in BLE adapter or an USB dongle. For more details see supported platforms of [Homebridge](https://github.com/nfarina/homebridge) and [Noble](https://github.com/sandeepmistry/noble)._\n\n\n## Apple Device (iOS 10 or newer)\n\n### Pairing\nOpen Home app and tap the '+' button to add new accessory. When you attempt to add the 'Raspberry Pi 3' bridge, it will ask for a \"PIN\" from the `config.json` file. Once you are paired with your new Rapsberry, Homebridge server all the connected BLE accesories can be added the same way as the bridge.\n\n### Interacting\nOnce your BLE accessory has been added to HomeKit database, besides using the Home app or Control Center at the bottom of the screen, you should be able to tell Siri to get the reading from any HomeKit accessory. Try _\"Hey Siri, what's the humidity of the Arduino?\"_. However, Siri is a cloud service and iOS may need some time to synchronize your HomeKit database to iCloud.\n\n<img src=\"images/ios-home.png\" width=\"30%\">\n<img src=\"images/ios-temperature.png\" width=\"30%\">\n<img src=\"images/ios-siri-temperature.png\" width=\"30%\">\n\n<img src=\"images/ios-humidity.png\" width=\"30%\">\n<img src=\"images/ios-siri-humidity.png\" width=\"30%\">\n"
  },
  {
    "path": "examples/lightbulb/arduino101/arduino101.ino",
    "content": "#include <Arduino.h>\n#include <CurieBLE.h>\n\nconst int pinLED = 13;\n\n\nBLEPeripheral ble;\nBLEService informationService(\"180A\");\nBLECharacteristic modelCharacteristic(\"2A24\", BLERead, \"101\");\nBLECharacteristic manufacturerCharacteristic(\"2A29\", BLERead, \"Arduino\");\nBLECharacteristic serialNumberCharacteristic(\"2A25\", BLERead, \"2.71828\");\n\nBLEService lightbulbService(\"8E76F000-690E-472E-88C3-051277686A73\");\nBLECharCharacteristic onCharacteristic(\"8E76F001-690E-472E-88C3-051277686A73\", BLEWrite | BLERead | BLENotify);\n\n\nvoid setup() {\n  Serial.begin(115200);\n  pinMode(pinLED, OUTPUT);\n\n  ble.setLocalName(\"Light\");\n  ble.setAdvertisedServiceUuid(lightbulbService.uuid());\n  ble.addAttribute(informationService);\n  ble.addAttribute(modelCharacteristic);\n  ble.addAttribute(manufacturerCharacteristic);\n  ble.addAttribute(serialNumberCharacteristic);\n\n  ble.addAttribute(lightbulbService);\n  ble.addAttribute(onCharacteristic);\n\n  bool on = true;\n  onCharacteristic.setValueLE(on);\n  setLED(on);\n\n  ble.setEventHandler(BLEConnected, centralConnect);\n  ble.setEventHandler(BLEDisconnected, centralDisconnect);\n  onCharacteristic.setEventHandler(BLEWritten, characteristicWrite);\n\n  ble.begin();\n  Serial.println(\"Bluetooth on\");\n}\n\nvoid loop() {\n  ble.poll();\n}\n\n\nvoid centralConnect(BLECentral& central) {\n  Serial.print(\"Central connected | \");\n  Serial.println(central.address());\n}\n\nvoid centralDisconnect(BLECentral& central) {\n  Serial.print(\"Central disconnected | \");\n  Serial.println(central.address());\n}\n\nvoid characteristicWrite(BLECentral& central, BLECharacteristic& characteristic) {\n  Serial.print(\"Characteristic written | \");\n  Serial.println(characteristic.uuid());\n\n  bool on = (bool) onCharacteristic.valueLE();\n  setLED(on);\n}\n\nvoid setLED(bool on) {\n  Serial.print(\"LED | \");\n  Serial.print(on);\n  digitalWrite(pinLED, on);\n}\n"
  },
  {
    "path": "examples/lightbulb/config.json",
    "content": "{\n  \"bridge\": {\n    \"name\": \"Raspberry Pi 3\",\n    \"username\": \"CC:22:3D:E3:CE:30\",\n    \"port\": 51826,\n    \"pin\": \"314-15-926\"\n  },\n  \"description\": \"Raspberry Pi 3 Homebridge-Bluetooth Lightbulb Example\",\n  \"platforms\": [\n    {\n      \"platform\": \"Bluetooth\",\n      \"accessories\": [\n        {\n          \"name\": \"Arduino\",\n          \"address\": \"01:23:45:67:89:AB\",\n          \"services\": [\n            {\n              \"name\": \"LED\",\n              \"type\": \"Lightbulb\",\n              \"UUID\": \"8E76F000-690E-472E-88C3-051277686A73\",\n              \"characteristics\": [\n                {\n                  \"type\": \"On\",\n                  \"UUID\": \"8E76F001-690E-472E-88C3-051277686A73\"\n                }\n              ]\n            }\n          ]\n        }\n      ]\n    }\n  ]\n}\n"
  },
  {
    "path": "examples/lightbulb/readme.md",
    "content": "\r\n# Lightbulb\r\n\r\n\r\nTurn an LED connected to a BLE capable microprocessor into a wireless HomeKit lightbulb. Use the Home app or Siri on your Apple device to switch it on and off.\r\n\r\n<img src=\"images/lightbulb.jpg\">\r\n\r\nThis example uses [Arduino 101](https://www.arduino.cc/en/Main/ArduinoBoard101) and [Raspberry Pi 3](https://www.raspberrypi.org/). Generally, any programmable BLE peripheral and a box capable of running [Node.js](https://nodejs.org) with [Noble](https://github.com/sandeepmistry/noble) will work.\r\n\r\n\r\n## BLE Peripheral (Arduino 101 or Other BLE Board)\r\n\r\nDownload and install the latest version of the [Arduino IDE](https://www.arduino.cc/en/Main/Software). If you're totally new to microcontrollers take some time to go through an introductory tutorial and learn how to make a LED blink. This will help you to understand how to use the IDE, how to upload a sketch and what is the code actually doing.\r\n\r\n### Wiring\r\nConnect the LED to pin 13. The LED has to have a resistor in series to limit the current passing through - max current per I/O pin is 20 mA. Generally, anything between 100 and 1k Ohms will do. If you're lazy you can also skip the wiring and use the onboard LED connected to pin 13.\r\n\r\n<img src=\"arduino101/arduino101.png\" width=\"30%\">\r\n\r\n**Note** _Alternatively, you can use any of the many BLE boards available on the market ([BlueBean](https://punchthrough.com/bean/), [RedBearLabs BLE Nano](http://redbearlab.com/blenano), ...) as long as you keep UUIDs of the services and characteristics in sync with your `config.json` file, everything will work just fine._\r\n\r\n### Running the Sketch\r\nCompile, run and upload the [arduino101.ino sketch](arduino101/arduino101.ino) using the [Arduino IDE](https://www.arduino.cc/en/Main/Software). The sketch creates a BLE service with a readable, writable and notifiable characteristic for on/off state.\r\n\r\n```cpp\r\nBLEService lightbulbService(\"8E76F000-690E-472E-88C3-051277686A73\");\r\nBLECharCharacteristic onCharacteristic(\"8E76F001-690E-472E-88C3-051277686A73\", BLEWrite | BLERead | BLENotify);\r\n```\r\n\r\nTake a look into [this file](https://github.com/KhaosT/HAP-NodeJS/blob/master/lib/gen/HomeKitTypes.js#L1147) to see the full definition of the _On_ characteristic used in the _Lightbulb_ service. Once the BLE central device is setup, it connects to this characteristic and exposes it via Homebridge as a HomeKit accessory of type _Lightbulb_.\r\n\r\nLeave the device powered on and the sketch running while you setup the Homebridge server. The sketch has some built-in logging, so keeping the Serial monitor open may be helpful for debugging.\r\n\r\n\r\n## BLE Central & Homebridge Server (Raspberry Pi 3 or Other Compatible Box)\r\n\r\nFor help installing an operating system on your new Pi, the official documentation contains a couple of [nice videos](https://www.raspberrypi.org/help/videos/).\r\n\r\n### Wiring\r\nNo wiring except for the micro-USB cable providing power is needed. The Pi needs to be connected to the same router (subnet) as the Apple device you plan to use. It doesn't matter whether via Wifi or Ethernet. Otherwise, you won't be able discover and connect to the Homebridge server running on the Pi.\r\n\r\n<img src=\"images/raspberry.png\" width=\"30%\">\r\n\r\n**Note** _Alternatively, you can use a Raspberry Pi 2 with a supported USB BLE dongle instead of the Pi 3._\r\n\r\n### Running Homebridge\r\nRunning Homebridge on a Raspberry Pi is straightforward. Follow [this guide](https://github.com/nfarina/homebridge/wiki/Running-HomeBridge-on-a-Raspberry-Pi) to install Homebridge server and then run the following command to install the homebridge-bluetooth plugin:\r\n\r\n```sh\r\n[sudo] npm install -g homebridge-bluetooth\r\n```\r\n\r\nEdit the `~/.homebridge/config.json`, name your Homebridge server and add a new accessory to allow the plugin to connect to the BLE service running on the Arduino:\r\n\r\n```js\r\n\"name\": \"Arduino\",\r\n\"address\": \"01:23:45:67:89:AB\",\r\n\"services\": [ {\r\n    \"name\": \"LED\",\r\n    \"type\": \"Lightbulb\",\r\n    \"UUID\": \"8E76F000-690E-472E-88C3-051277686A73\",\r\n    \"characteristics\": [ {\r\n        \"type\": \"On\",\r\n        \"UUID\": \"8E76F001-690E-472E-88C3-051277686A73\"\r\n    } ]\r\n} ]\r\n```\r\n\r\nFinally, start the Homebridge server. If you use Linux you may need to run with higher privileges in order to have access to the BLE hardware layer. See [this link](https://github.com/sandeepmistry/noble#running-without-rootsudo) for more details about running without `sudo`.\r\n\r\n```sh\r\n[sudo] homebridge -D\r\n```\r\n\r\n**Note** _Running with `-D` turns on additional debugging output that is very helpful for getting addresses and UUIDs of your BLE devices that needs to match with the `config.json` file._\r\n\r\n<img src=\"images/homebridge.png\">\r\n\r\n**Note** _Homebridge server doesn't run only on Linux. MacOS and Windows machines are also supported given they have a built-in BLE adapter or an USB dongle. For more details see supported platforms of [Homebridge](https://github.com/nfarina/homebridge) and [Noble](https://github.com/sandeepmistry/noble)._\r\n\r\n\r\n## Apple Device (iOS 10 or newer)\r\n\r\n### Pairing\r\nOpen Home app and tap the '+' button to add new accessory. When you attempt to add the 'Raspberry Pi 3' bridge, it will ask for a \"PIN\" from the `config.json` file. Once you are paired with your new Rapsberry, Homebridge server all the connected BLE accesories can be added the same way as the bridge.\r\n\r\n### Interacting\r\nOnce your BLE accessory has been added to HomeKit database, besides using the Home app or Control Center at the bottom of the screen, you should be able to tell Siri to control any HomeKit accessory. Try _\"Hey Siri, turn on LED\"_. However, Siri is a cloud service and iOS may need some time to synchronize your HomeKit database to iCloud.\r\n\r\n<img src=\"images/ios-home.png\" width=\"30%\">\r\n<img src=\"images/ios-on.png\" width=\"30%\">\r\n<img src=\"images/ios-siri.png\" width=\"30%\">\r\n"
  },
  {
    "path": "examples/lightbulb-rgb/arduino101/arduino101.ino",
    "content": "#include <math.h>\n#include <Arduino.h>\n#include <CurieBLE.h>\n\nconst int pinRedLED = 5;\nconst int pinGreenLED = 6;\nconst int pinBlueLED = 9;\nconst int pinSwitch = 2;\n\n\nBLEPeripheral ble;\nBLEService informationService(\"180A\");\nBLECharacteristic modelCharacteristic(\"2A24\", BLERead, \"101\");\nBLECharacteristic manufacturerCharacteristic(\"2A29\", BLERead, \"Arduino\");\nBLECharacteristic serialNumberCharacteristic(\"2A25\", BLERead, \"2.71828\");\n\nBLEService lightbulbService(\"57E54BF0-8574-47BE-9C1D-A0DBFC8FA183\");\nBLECharCharacteristic onCharacteristic(\"57E54BF1-8574-47BE-9C1D-A0DBFC8FA183\", BLERead | BLEWrite | BLENotify);\nBLEFloatCharacteristic hueCharacteristic(\"57E54BF2-8574-47BE-9C1D-A0DBFC8FA183\", BLERead | BLEWrite | BLENotify);\nBLEFloatCharacteristic saturationCharacteristic(\"57E54BF3-8574-47BE-9C1D-A0DBFC8FA183\", BLERead | BLEWrite | BLENotify);\nBLEIntCharacteristic brightnessCharacteristic(\"57E54BF4-8574-47BE-9C1D-A0DBFC8FA183\", BLERead | BLEWrite | BLENotify);\nbool lastSwitch = HIGH;\n\n\nvoid setup() {\n  Serial.begin(115200);\n  pinMode(pinRedLED, OUTPUT);\n  pinMode(pinGreenLED, OUTPUT);  \n  pinMode(pinBlueLED, OUTPUT);\n  pinMode(pinSwitch, INPUT_PULLUP);\n\n  ble.setLocalName(\"Light\");\n  ble.setAdvertisedServiceUuid(lightbulbService.uuid());\n  ble.addAttribute(informationService);\n  ble.addAttribute(modelCharacteristic);\n  ble.addAttribute(manufacturerCharacteristic);\n  ble.addAttribute(serialNumberCharacteristic);\n\n  ble.addAttribute(lightbulbService);\n  ble.addAttribute(onCharacteristic);\n  ble.addAttribute(hueCharacteristic);\n  ble.addAttribute(saturationCharacteristic);\n  ble.addAttribute(brightnessCharacteristic);\n\n  bool on = true;\n  float hue = 0.0;\n  float saturation = 0.0;\n  int brightness = 100;\n  onCharacteristic.setValueLE(on);\n  hueCharacteristic.setValueLE(hue);\n  saturationCharacteristic.setValueLE(saturation);\n  brightnessCharacteristic.setValueLE(brightness);\n  setLED(on, hue, saturation, brightness);\n\n  ble.setEventHandler(BLEConnected, centralConnect);\n  ble.setEventHandler(BLEDisconnected, centralDisconnect);\n  onCharacteristic.setEventHandler(BLEWritten, characteristicWrite);\n  hueCharacteristic.setEventHandler(BLEWritten, characteristicWrite);\n  saturationCharacteristic.setEventHandler(BLEWritten, characteristicWrite);\n  brightnessCharacteristic.setEventHandler(BLEWritten, characteristicWrite);\n\n  ble.begin();\n  Serial.println(\"Bluetooth on\");\n  lastSwitch = digitalRead(pinSwitch);\n}\n\nvoid loop() {\n  ble.poll();\n\n  if ((digitalRead(pinSwitch) == LOW) && (lastSwitch == HIGH)) {\n    bool on = (bool) onCharacteristic.valueLE();\n    float hue = (float) hueCharacteristic.valueLE();\n    float saturation = (float) saturationCharacteristic.valueLE();\n    int brightness = (int) brightnessCharacteristic.valueLE();\n    setLED(!on, hue, saturation, brightness);\n    onCharacteristic.setValue(!on);\n    ble.poll();\n    lastSwitch = LOW;\n    delay(1);\n  } else if ((digitalRead(pinSwitch) == HIGH) && (lastSwitch == LOW)) {\n    lastSwitch = HIGH;\n    delay(1);\n  }\n}\n\nvoid centralConnect(BLECentral& central) {\n  Serial.print(\"Central connected | \");\n  Serial.println(central.address());\n}\n\nvoid centralDisconnect(BLECentral& central) {\n  Serial.print(\"Central disconnected | \");\n  Serial.println(central.address());\n}\n\nvoid characteristicWrite(BLECentral& central, BLECharacteristic& characteristic) {\n  Serial.print(\"Characteristic written | \");\n  Serial.println(characteristic.uuid());\n\n  bool on = (bool) onCharacteristic.valueLE();\n  float hue = (float) hueCharacteristic.valueLE();\n  float saturation = (float) saturationCharacteristic.valueLE();\n  int brightness = (int) brightnessCharacteristic.valueLE();\n  setLED(on, hue, saturation, brightness);\n}\n\nvoid setLED(bool on, float hue, float saturation, int brightness) {\n  hue = max(0.0, min(360.0, hue));\n  saturation = max(0.0, min(100.0, saturation));\n  brightness = max(0, min(100, brightness));\n\n  unsigned int red, green, blue;\n  hsv2rgb(hue, saturation/100.0, brightness/100.0, &red, &green, &blue);\n  analogWrite(pinRedLED, on * red);\n  analogWrite(pinGreenLED, on * green);\n  analogWrite(pinBlueLED, on * blue);\n  \n  Serial.print(\"RGB LED | \");\n  Serial.print(on);\n  Serial.print(\" HSB(\");\n  Serial.print(hue);\n  Serial.print(\",\");\n  Serial.print(saturation);\n  Serial.print(\",\");\n  Serial.print(brightness);\n  Serial.print(\") -> RGB(\");\n  Serial.print(red);\n  Serial.print(\",\");\n  Serial.print(green);\n  Serial.print(\",\");\n  Serial.print(blue);\n  Serial.println(\")\");\n}\n\nvoid hsv2rgb(float hue, float saturation, float value,\n             unsigned int* red, unsigned int* green, unsigned int* blue) {\n  if (saturation == 0.0) {\n    *red   = (unsigned int) round(value * 255.0);\n    *green = (unsigned int) round(value * 255.0);\n    *blue  = (unsigned int) round(value * 255.0);\n  } else {\n    int h = ((int) floor(hue / 60.0) % 6);\n    float f = (hue / 60.0) - floor(hue / 60.0);\n    float p = value * (1.0 - saturation);\n    float q = value * (1.0 - saturation * f);\n    float t = value * (1.0 - (saturation * (1.0 - f)));\n    switch (h) {\n      case 0:\n        *red   = (unsigned int) round(value * 255.0);\n        *green = (unsigned int) round(t * 255.0);\n        *blue  = (unsigned int) round(p * 255.0);\n        break;\n      case 1:\n        *red   = (unsigned int) round(q * 255.0);\n        *green = (unsigned int) round(value * 255.0);\n        *blue  = (unsigned int) round(p * 255.0);\n        break;\n      case 2:\n        *red   = (unsigned int) round(p * 255.0);\n        *green = (unsigned int) round(value * 255.0);\n        *blue  = (unsigned int) round(t * 255.0);\n        break;\n      case 3:\n        *red   = (unsigned int) round(p * 255.0);\n        *green = (unsigned int) round(q * 255.0);\n        *blue  = (unsigned int) round(value * 255.0);\n        break;\n      case 4:\n        *red   = (unsigned int) round(t * 255.0);\n        *green = (unsigned int) round(p * 255.0);\n        *blue  = (unsigned int) round(value * 255.0);\n        break;\n      case 5:\n        *red   = (unsigned int) round(value * 255.0);\n        *green = (unsigned int) round(p * 255.0);\n        *blue  = (unsigned int) round(q * 255.0);\n        break;\n    }\n  }\n}\n"
  },
  {
    "path": "examples/lightbulb-rgb/config.json",
    "content": "{\n  \"bridge\": {\n    \"name\": \"Raspberry Pi 3\",\n    \"username\": \"CC:22:3D:E3:CE:30\",\n    \"port\": 51826,\n    \"pin\": \"314-15-926\"\n  },\n  \"description\": \"Raspberry Pi 3 Homebridge-Bluetooth RGB Lightbulb Example\",\n  \"platforms\": [\n    {\n      \"platform\": \"Bluetooth\",\n      \"accessories\": [\n        {\n          \"name\": \"Arduino\",\n          \"address\": \"01:23:45:67:89:AB\",\n          \"services\": [\n            {\n              \"name\": \"RGB LED\",\n              \"type\": \"Lightbulb\",\n              \"UUID\": \"57E54BF0-8574-47BE-9C1D-A0DBFC8FA183\",\n              \"characteristics\": [\n                {\n                  \"type\": \"On\",\n                  \"UUID\": \"57E54BF1-8574-47BE-9C1D-A0DBFC8FA183\"\n                },\n                {\n                  \"type\": \"Hue\",\n                  \"UUID\": \"57E54BF2-8574-47BE-9C1D-A0DBFC8FA183\"\n                },\n                {\n                  \"type\": \"Saturation\",\n                  \"UUID\": \"57E54BF3-8574-47BE-9C1D-A0DBFC8FA183\"\n                },\n                {\n                  \"type\": \"Brightness\",\n                  \"UUID\": \"57E54BF4-8574-47BE-9C1D-A0DBFC8FA183\"\n                }\n              ]\n            }\n          ]\n        }\n      ]\n    }\n  ]\n}\n"
  },
  {
    "path": "examples/lightbulb-rgb/readme.md",
    "content": "\n# RGB Lightbulb\n\n\nTurn a bunch of LEDs connected to a BLE capable microprocessor into a wireless HomeKit light. Use the Home app or Siri on your Apple device to switch it on, change color or reduce brightness.\n\n<img src=\"images/lightbulb-rgb.jpg\">\n\nThis example uses [Arduino 101](https://www.arduino.cc/en/Main/ArduinoBoard101) and [Raspberry Pi 3](https://www.raspberrypi.org/). Generally, any programmable BLE peripheral and a box capable of running [Node.js](https://nodejs.org) with [Noble](https://github.com/sandeepmistry/noble) will work.\n\n\n## BLE Peripheral (Arduino 101 or Other BLE Board)\n\nDownload and install the latest version of the [Arduino IDE](https://www.arduino.cc/en/Main/Software). If you're totally new to microcontrollers take some time to go through an introductory tutorial and learn how to make a LED blink. This will help you to understand how to use the IDE, how to upload a sketch and what is the code actually doing.\n\n### Wiring\nConnect 3 LEDs to pins 9, 6 and 5. These pins support PWM and therefore can be programmed to dim the LEDs. Each LED needs to have a resistor to limit the current passing through - max current per I/O pin is 20 mA. Anything between 100 Ohms and 1k Ohms will do.\n\nThe tactile switch is connected to pin 2 and when pushed connects the pin to the ground. The sketch code activates the internal 10k Ohm pull-up resitor to keep the pin high when the switch isn't pressed.\n\n<img src=\"arduino101/arduino101.png\" width=\"30%\">\n\n**Note** _Alternatively, you can use any of the many BLE boards available on the market ([BlueBean](https://punchthrough.com/bean/), [RedBearLabs BLE Nano](http://redbearlab.com/blenano), ...) as long as you keep UUIDs of the services and characteristics in sync with your `config.json` file, everything will work just fine._\n\n### Running the Sketch\nCompile, run and upload the [arduino101.ino sketch](arduino101/arduino101.ino) using the [Arduino IDE](https://www.arduino.cc/en/Main/Software).\nThe sketch creates a BLE service with 4 characteristics. There's one characteristic for on/off characteristic (type `BOOL`), two for hue & saturation (type `FLOAT`) and the fourth one for brightness (type `INT`). All charactersitis have read, write and notify permissions.\n\n```cpp\nBLEService lightbulbService(\"57E54BF0-8574-47BE-9C1D-A0DBFC8FA183\");\nBLECharCharacteristic onCharacteristic(\"57E54BF1-8574-47BE-9C1D-A0DBFC8FA183\", BLERead | BLEWrite | BLENotify);\nBLEFloatCharacteristic hueCharacteristic(\"57E54BF2-8574-47BE-9C1D-A0DBFC8FA183\", BLERead | BLEWrite | BLENotify);\nBLEFloatCharacteristic saturationCharacteristic(\"57E54BF3-8574-47BE-9C1D-A0DBFC8FA183\", BLERead | BLEWrite | BLENotify);\nBLEIntCharacteristic brightnessCharacteristic(\"57E54BF4-8574-47BE-9C1D-A0DBFC8FA183\", BLERead | BLEWrite | BLENotify);\n```\n\nWhen the tactile switch is toggled the LEDs turn on (or turn off if they were on) and the BLE subscribe-notification mechanism cases the an update update on the Homebridge. This way the information about switching propagates through callbacks to the Apple device without any polling.\n\nTake a look into [this file](https://github.com/KhaosT/HAP-NodeJS/blob/master/lib/gen/HomeKitTypes.js#L1147) to see the full definition of the _Lightbulb_ service.\n\nOnce the BLE central device is setup, it connects to this characteristic and exposes it via Homebridge as a HomeKit accessory of type _Lightbulb_. The sketch also contains some logic to convert HSV colors to RGB values for each LED.\n\nLeave the device powered on and the sketch running while you setup the Homebridge server. The sketch has some built-in logging, so keeping the Serial monitor open may be helpful for debugging.\n\n\n## BLE Central & Homebridge Server (Raspberry Pi 3 or Other Compatible Box)\n\nFor help installing an operating system on your new Pi, the official documentation contains a couple of [nice videos](https://www.raspberrypi.org/help/videos/).\n\n### Wiring\nNo wiring except for the micro-USB cable providing power is needed. The Pi needs to be connected to the same router (subnet) as the Apple device you plan to use. It doesn't matter whether via Wifi or Ethernet. Otherwise, you won't be able discover and connect to the Homebridge server running on the Pi.\n\n<img src=\"images/raspberry.png\" width=\"30%\">\n\n**Note** _Alternatively, you can use a Raspberry Pi 2 with a supported USB BLE dongle instead of the Pi 3._\n\n### Running Homebridge\nRunning Homebridge on a Raspberry Pi is straightforward. Follow [this guide](https://github.com/nfarina/homebridge/wiki/Running-HomeBridge-on-a-Raspberry-Pi) to install Homebridge server and then run the following command to install the homebridge-bluetooth plugin:\n\n```sh\n[sudo] npm install -g homebridge-bluetooth\n```\n\nEdit the `~/.homebridge/config.json`, name your Homebridge server and add a new accessory to allow the plugin to connect to the BLE service running on the Arduino:\n\n```js\n\"name\": \"Arduino\",\n\"address\": \"01:23:45:67:89:AB\",\n\"services\": [ {\n    \"name\": \"RGB LED\",\n    \"type\": \"Lightbulb\",\n    \"UUID\": \"57E54BF0-8574-47BE-9C1D-A0DBFC8FA183\",\n    \"characteristics\": [ {\n            \"type\": \"On\",\n            \"UUID\": \"57E54BF1-8574-47BE-9C1D-A0DBFC8FA183\"\n        }, {\n            \"type\": \"Brightness\",\n            \"UUID\": \"57E54BF2-8574-47BE-9C1D-A0DBFC8FA183\"\n        }, {\n            \"type\": \"Saturation\",\n            \"UUID\": \"857E54BF3-8574-47BE-9C1D-A0DBFC8FA183\"\n          }, {\n            \"type\": \"Hue\",\n            \"UUID\": \"857E54BF4-8574-47BE-9C1D-A0DBFC8FA183\"\n      } ]\n} ]\n```\n\nFinally, start the Homebridge server. If you use Linux you may need to run with higher privileges in order to have access to the BLE hardware layer. See [this link](https://github.com/sandeepmistry/noble#running-without-rootsudo) for more details about running without `sudo`.\n\n```\n[sudo] homebridge -D\n```\n\n**Note** _Running with `-D` turns on additional debugging output that is very helpful for getting addresses and UUIDs of your BLE devices that needs to match with the `config.json` file._\n\n<img src=\"images/homebridge.png\">\n\n**Note** _Homebridge server doesn't run only on Linux. MacOS and Windows machines are also supported given they have a built-in BLE adapter or an USB dongle. For more details see supported platforms of [Homebridge](https://github.com/nfarina/homebridge) and [Noble](https://github.com/sandeepmistry/noble)._\n\n\n## Apple Device\n\n### Pairing\nOpen Home app and tap the '+' button to add new accessory. When you attempt to add the 'Raspberry Pi 3' bridge, it will ask for a \"PIN\" from the `config.json` file. Once you are paired with your new Rapsberry Homebridge server all the Arduino accesory can be added the same way as the bridge.\n\n### Interacting\nOnce your BLE accessory has been added to HomeKit database, besides using the Home app or Control Center at the bottom of the screen, you should be able to tell Siri to control any HomeKit accessory. Try _\"Hey Siri, dim RGB LED to 50%\"_. However, Siri is a cloud service and iOS may need some time to synchronize your HomeKit database to iCloud.\n\n<img src=\"images/ios-accesories.png\" width=\"30%\">\n<img src=\"images/ios-brightness.png\" width=\"30%\">\n<img src=\"images/ios-color.png\" width=\"30%\">\n\n<img src=\"images/ios-hsv.png\" width=\"30%\">\n<img src=\"images/ios-siri-brightness.png\" width=\"30%\">\n<img src=\"images/ios-siri-color.png\" width=\"30%\">\n"
  },
  {
    "path": "examples/lock/arduino101/arduino101.ino",
    "content": "#include <Arduino.h>\n#include <CurieBLE.h>\n#include \"sensor.h\"\n#include \"motor.h\"\n#include \"lock.h\"\n\n\nstatic struct BoardPins {\n  const uint8_t Motor1 = 1;\n  const uint8_t Motor2 = 2;\n  const uint8_t MotorPWM = 3;\n  const uint8_t Sensor1A = 4;\n  const uint8_t Sensor1B = 5;\n  const uint8_t Sensor2A = 6;\n  const uint8_t Sensor2B = 7;\n} Pin;\n\n\nBLEPeripheral ble;\nBLEService informationService(\"180A\");\nBLECharacteristic modelCharacteristic(\"2A24\", BLERead, \"Arduino 101\");\nBLECharacteristic manufacturerCharacteristic(\"2A29\", BLERead, \"Lockitron\");\nBLECharacteristic serialNumberCharacteristic(\"2A25\", BLERead, \"V1\");\n\nBLEService lockMechanismService(\"43AAF900-5FF0-4633-95A2-FE4189EE103B\");\nBLEUnsignedCharCharacteristic targetStateCharacteristic(\"43AAF901-5FF0-4633-95A2-FE4189EE103B\",\n                                                        BLEWrite | BLERead | BLENotify);\nBLEUnsignedCharCharacteristic currentStateCharacteristic(\"43AAF902-5FF0-4633-95A2-FE4189EE103B\",\n                                                         BLERead | BLENotify);\n\nSensor sensor1A(Pin.Sensor1A);\nSensor sensor1B(Pin.Sensor1B);\nSensor sensor2A(Pin.Sensor2A);\nSensor sensor2B(Pin.Sensor2B);\nMotor motor(Pin.Motor1, Pin.Motor2, Pin.MotorPWM, 128);\nLock lock = Lock(sensor1A, sensor1B, sensor2A, sensor2B, motor, true);\nvolatile bool targetStateUpdate = false;\n\n\nvoid targetStateWritten(BLECentral& /*central*/, BLECharacteristic& /*characteristic*/) {\n   targetStateUpdate = true;\n}\n\n\nvoid setup() {\n  Serial.begin(115200);\n\n  ble.setLocalName(\"Lock\");\n  ble.addAttribute(informationService);\n  ble.addAttribute(modelCharacteristic);\n  ble.addAttribute(manufacturerCharacteristic);\n  ble.addAttribute(serialNumberCharacteristic);\n\n  ble.addAttribute(lockMechanismService);\n  ble.addAttribute(targetStateCharacteristic);\n  ble.addAttribute(currentStateCharacteristic);\n  targetStateCharacteristic.setEventHandler(BLEWritten, targetStateWritten);\n\n  ble.begin();\n  lock.begin();\n}\n\nvoid loop() {\n  ble.poll();\n  delay(200);\n\n  if (targetStateUpdate) {\n    lock.set(targetStateCharacteristic.valueLE());\n    currentStateCharacteristic.setValueLE(lock.state());\n    targetStateUpdate = false;\n  }\n\n  if (lock.state() != currentStateCharacteristic.valueLE()) {\n    targetStateCharacteristic.setValueLE(lock.state());\n    currentStateCharacteristic.setValueLE(lock.state());\n  }\n}\n\n"
  },
  {
    "path": "examples/lock/arduino101/arduino101.sch",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!DOCTYPE eagle SYSTEM \"eagle.dtd\">\n<eagle version=\"7.5.0\">\n<drawing>\n<settings>\n<setting alwaysvectorfont=\"no\"/>\n<setting verticaltext=\"up\"/>\n</settings>\n<grid distance=\"0.1\" unitdist=\"inch\" unit=\"inch\" style=\"lines\" multiple=\"1\" display=\"no\" altdistance=\"0.01\" altunitdist=\"inch\" altunit=\"inch\"/>\n<layers>\n<layer number=\"1\" name=\"Top\" color=\"4\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"16\" name=\"Bottom\" color=\"1\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"17\" name=\"Pads\" color=\"2\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"18\" name=\"Vias\" color=\"2\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"19\" name=\"Unrouted\" color=\"6\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"20\" name=\"Dimension\" color=\"15\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"21\" name=\"tPlace\" color=\"7\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"22\" name=\"bPlace\" color=\"7\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"23\" name=\"tOrigins\" color=\"15\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"24\" name=\"bOrigins\" color=\"15\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"25\" name=\"tNames\" color=\"7\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"26\" name=\"bNames\" color=\"7\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"27\" name=\"tValues\" color=\"7\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"28\" name=\"bValues\" color=\"7\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"29\" name=\"tStop\" color=\"7\" fill=\"3\" visible=\"no\" active=\"no\"/>\n<layer number=\"30\" name=\"bStop\" color=\"7\" fill=\"6\" visible=\"no\" active=\"no\"/>\n<layer number=\"31\" name=\"tCream\" color=\"7\" fill=\"4\" visible=\"no\" active=\"no\"/>\n<layer number=\"32\" name=\"bCream\" color=\"7\" fill=\"5\" visible=\"no\" active=\"no\"/>\n<layer number=\"33\" name=\"tFinish\" color=\"6\" fill=\"3\" visible=\"no\" active=\"no\"/>\n<layer number=\"34\" name=\"bFinish\" color=\"6\" fill=\"6\" visible=\"no\" active=\"no\"/>\n<layer number=\"35\" name=\"tGlue\" color=\"7\" fill=\"4\" visible=\"no\" active=\"no\"/>\n<layer number=\"36\" name=\"bGlue\" color=\"7\" fill=\"5\" visible=\"no\" active=\"no\"/>\n<layer number=\"37\" name=\"tTest\" color=\"7\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"38\" name=\"bTest\" color=\"7\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"39\" name=\"tKeepout\" color=\"4\" fill=\"11\" visible=\"no\" active=\"no\"/>\n<layer number=\"40\" name=\"bKeepout\" color=\"1\" fill=\"11\" visible=\"no\" active=\"no\"/>\n<layer number=\"41\" name=\"tRestrict\" color=\"4\" fill=\"10\" visible=\"no\" active=\"no\"/>\n<layer number=\"42\" name=\"bRestrict\" color=\"1\" fill=\"10\" visible=\"no\" active=\"no\"/>\n<layer number=\"43\" name=\"vRestrict\" color=\"2\" fill=\"10\" visible=\"no\" active=\"no\"/>\n<layer number=\"44\" name=\"Drills\" color=\"7\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"45\" name=\"Holes\" color=\"7\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"46\" name=\"Milling\" color=\"3\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"47\" name=\"Measures\" color=\"7\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"48\" name=\"Document\" color=\"7\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"49\" name=\"Reference\" color=\"7\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"50\" name=\"dxf\" color=\"7\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"51\" name=\"tDocu\" color=\"7\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"52\" name=\"bDocu\" color=\"7\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"53\" name=\"tGND_GNDA\" color=\"7\" fill=\"9\" visible=\"no\" active=\"no\"/>\n<layer number=\"54\" name=\"bGND_GNDA\" color=\"1\" fill=\"9\" visible=\"no\" active=\"no\"/>\n<layer number=\"56\" name=\"wert\" color=\"7\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"57\" name=\"tCAD\" color=\"7\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"59\" name=\"tCarbon\" color=\"7\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"60\" name=\"bCarbon\" color=\"7\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"90\" name=\"Modules\" color=\"5\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"91\" name=\"Nets\" color=\"2\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"92\" name=\"Busses\" color=\"1\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"93\" name=\"Pins\" color=\"2\" fill=\"1\" visible=\"no\" active=\"yes\"/>\n<layer number=\"94\" name=\"Symbols\" color=\"4\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"95\" name=\"Names\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"96\" name=\"Values\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"97\" name=\"Info\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"98\" name=\"Guide\" color=\"6\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"99\" name=\"SpiceOrder\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"100\" name=\"Muster\" color=\"7\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"101\" name=\"Patch_Top\" color=\"12\" fill=\"4\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"102\" name=\"Vscore\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"103\" name=\"tMap\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"104\" name=\"Name\" color=\"16\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"105\" name=\"tPlate\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"106\" name=\"bPlate\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"107\" name=\"Crop\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"108\" name=\"fp8\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"109\" name=\"fp9\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"110\" name=\"fp0\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"111\" name=\"LPC17xx\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"112\" name=\"tSilk\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"113\" name=\"IDFDebug\" color=\"4\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"114\" name=\"Badge_Outline\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"115\" name=\"ReferenceISLANDS\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"116\" name=\"Patch_BOT\" color=\"9\" fill=\"4\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"118\" name=\"Rect_Pads\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"121\" name=\"_tsilk\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"122\" name=\"_bsilk\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"123\" name=\"tTestmark\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"124\" name=\"bTestmark\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"125\" name=\"_tNames\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"126\" name=\"_bNames\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"127\" name=\"_tValues\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"128\" name=\"_bValues\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"129\" name=\"Mask\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"131\" name=\"tAdjust\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"132\" name=\"bAdjust\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"144\" name=\"Drill_legend\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"150\" name=\"Notes\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"151\" name=\"HeatSink\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"152\" name=\"_bDocu\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"153\" name=\"FabDoc1\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"154\" name=\"FabDoc2\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"155\" name=\"FabDoc3\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"199\" name=\"Contour\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"200\" name=\"200bmp\" color=\"1\" fill=\"10\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"201\" name=\"201bmp\" color=\"2\" fill=\"10\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"202\" name=\"202bmp\" color=\"3\" fill=\"10\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"203\" name=\"203bmp\" color=\"4\" fill=\"10\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"204\" name=\"204bmp\" color=\"5\" fill=\"10\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"205\" name=\"205bmp\" color=\"6\" fill=\"10\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"206\" name=\"206bmp\" color=\"7\" fill=\"10\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"207\" name=\"207bmp\" color=\"8\" fill=\"10\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"208\" name=\"208bmp\" color=\"9\" fill=\"10\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"209\" name=\"209bmp\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"210\" name=\"210bmp\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"211\" name=\"211bmp\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"212\" name=\"212bmp\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"213\" name=\"213bmp\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"214\" name=\"214bmp\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"215\" name=\"215bmp\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"216\" name=\"216bmp\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"217\" name=\"217bmp\" color=\"18\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"218\" name=\"218bmp\" color=\"19\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"219\" name=\"219bmp\" color=\"20\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"220\" name=\"220bmp\" color=\"21\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"221\" name=\"221bmp\" color=\"22\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"222\" name=\"222bmp\" color=\"23\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"223\" name=\"223bmp\" color=\"24\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"224\" name=\"224bmp\" color=\"25\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"225\" name=\"225bmp\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"226\" name=\"226bmp\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"227\" name=\"227bmp\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"228\" name=\"228bmp\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"229\" name=\"229bmp\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"230\" name=\"230bmp\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"231\" name=\"231bmp\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"248\" name=\"Housing\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"249\" name=\"Edge\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"250\" name=\"Descript\" color=\"3\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"251\" name=\"SMDround\" color=\"12\" fill=\"11\" visible=\"no\" active=\"no\"/>\n<layer number=\"254\" name=\"cooling\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"255\" name=\"routoute\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n</layers>\n<schematic xreflabel=\"%F%N/%S.%C%R\" xrefpart=\"/%S.%C%R\">\n<libraries>\n<library name=\"battery\">\n<description>&lt;b&gt;Lithium Batteries and NC Accus&lt;/b&gt;&lt;p&gt;\n&lt;author&gt;Created by librarian@cadsoft.de&lt;/author&gt;</description>\n<packages>\n<package name=\"CRAA\">\n<description>&lt;b&gt;LI BATTERY&lt;/b&gt; Varta</description>\n<wire x1=\"23.622\" y1=\"-7.493\" x2=\"-25.146\" y2=\"-7.493\" width=\"0.1524\" layer=\"21\"/>\n<wire x1=\"-25.146\" y1=\"6.985\" x2=\"-25.146\" y2=\"7.493\" width=\"0.1524\" layer=\"21\"/>\n<wire x1=\"-25.4\" y1=\"-3.175\" x2=\"-25.4\" y2=\"3.175\" width=\"0.4064\" layer=\"21\"/>\n<wire x1=\"-25.146\" y1=\"-7.493\" x2=\"-25.146\" y2=\"-6.985\" width=\"0.1524\" layer=\"21\"/>\n<wire x1=\"25.4\" y1=\"-2.413\" x2=\"25.4\" y2=\"2.413\" width=\"0.4064\" layer=\"51\"/>\n<wire x1=\"-25.4\" y1=\"-6.985\" x2=\"-25.4\" y2=\"-3.175\" width=\"0.1524\" layer=\"51\"/>\n<wire x1=\"-25.4\" y1=\"3.175\" x2=\"-25.4\" y2=\"6.985\" width=\"0.4064\" layer=\"51\"/>\n<wire x1=\"25.146\" y1=\"1.778\" x2=\"25.146\" y2=\"3.556\" width=\"0.1524\" layer=\"21\"/>\n<wire x1=\"25.146\" y1=\"-3.556\" x2=\"25.146\" y2=\"-1.778\" width=\"0.1524\" layer=\"21\"/>\n<wire x1=\"25.146\" y1=\"3.556\" x2=\"24.257\" y2=\"3.556\" width=\"0.1524\" layer=\"21\"/>\n<wire x1=\"24.257\" y1=\"3.556\" x2=\"24.257\" y2=\"6.858\" width=\"0.1524\" layer=\"21\"/>\n<wire x1=\"25.146\" y1=\"-3.556\" x2=\"24.257\" y2=\"-3.556\" width=\"0.1524\" layer=\"21\"/>\n<wire x1=\"24.257\" y1=\"-3.556\" x2=\"24.257\" y2=\"-1.27\" width=\"0.1524\" layer=\"21\"/>\n<wire x1=\"24.257\" y1=\"-1.27\" x2=\"24.257\" y2=\"1.27\" width=\"0.1524\" layer=\"51\"/>\n<wire x1=\"24.257\" y1=\"1.27\" x2=\"24.257\" y2=\"3.556\" width=\"0.1524\" layer=\"21\"/>\n<wire x1=\"-24.384\" y1=\"0\" x2=\"-22.86\" y2=\"0\" width=\"0.254\" layer=\"21\"/>\n<wire x1=\"-23.622\" y1=\"-0.762\" x2=\"-23.622\" y2=\"0.762\" width=\"0.254\" layer=\"21\"/>\n<wire x1=\"20.447\" y1=\"0\" x2=\"21.971\" y2=\"0\" width=\"0.1524\" layer=\"21\"/>\n<wire x1=\"23.622\" y1=\"-7.493\" x2=\"24.257\" y2=\"-6.858\" width=\"0.1524\" layer=\"21\" curve=\"90\"/>\n<wire x1=\"23.622\" y1=\"7.493\" x2=\"24.257\" y2=\"6.858\" width=\"0.1524\" layer=\"21\" curve=\"-90\"/>\n<wire x1=\"24.257\" y1=\"-6.858\" x2=\"24.257\" y2=\"-3.556\" width=\"0.1524\" layer=\"21\"/>\n<wire x1=\"23.622\" y1=\"7.493\" x2=\"-25.146\" y2=\"7.493\" width=\"0.1524\" layer=\"21\"/>\n<wire x1=\"-2.921\" y1=\"-2.54\" x2=\"-2.921\" y2=\"0\" width=\"0.254\" layer=\"21\"/>\n<wire x1=\"0.254\" y1=\"0\" x2=\"-1.651\" y2=\"0\" width=\"0.1524\" layer=\"21\"/>\n<wire x1=\"-2.921\" y1=\"0\" x2=\"-5.207\" y2=\"0\" width=\"0.1524\" layer=\"21\"/>\n<wire x1=\"-2.921\" y1=\"0\" x2=\"-2.921\" y2=\"2.54\" width=\"0.254\" layer=\"21\"/>\n<wire x1=\"-3.429\" y1=\"-1.524\" x2=\"-4.445\" y2=\"-1.524\" width=\"0.1524\" layer=\"21\"/>\n<wire x1=\"-3.937\" y1=\"-2.032\" x2=\"-3.937\" y2=\"-1.016\" width=\"0.1524\" layer=\"21\"/>\n<pad name=\"+\" x=\"-25.4\" y=\"-5.08\" drill=\"1.3208\" diameter=\"3.1496\" shape=\"octagon\"/>\n<pad name=\"+@1\" x=\"-25.4\" y=\"5.08\" drill=\"1.3208\" diameter=\"3.1496\" shape=\"octagon\"/>\n<pad name=\"-\" x=\"25.4\" y=\"0\" drill=\"1.3208\" diameter=\"3.1496\" shape=\"octagon\"/>\n<text x=\"-25.4\" y=\"8.255\" size=\"1.27\" layer=\"25\" ratio=\"10\">&gt;NAME</text>\n<text x=\"-10.16\" y=\"-5.08\" size=\"1.27\" layer=\"21\" ratio=\"10\">Lithium 3V</text>\n<text x=\"17.018\" y=\"-6.731\" size=\"1.27\" layer=\"21\" ratio=\"10\">CR-AA</text>\n<text x=\"-7.62\" y=\"3.81\" size=\"1.27\" layer=\"27\" ratio=\"10\">&gt;VALUE</text>\n<rectangle x1=\"-2.286\" y1=\"-1.27\" x2=\"-1.651\" y2=\"1.27\" layer=\"21\"/>\n</package>\n</packages>\n<symbols>\n<symbol name=\"1V2+2\">\n<wire x1=\"-1.905\" y1=\"0.635\" x2=\"-1.905\" y2=\"0\" width=\"0.4064\" layer=\"94\"/>\n<wire x1=\"-2.54\" y1=\"0\" x2=\"-1.905\" y2=\"0\" width=\"0.1524\" layer=\"94\"/>\n<wire x1=\"-1.905\" y1=\"0\" x2=\"-1.905\" y2=\"-0.635\" width=\"0.4064\" layer=\"94\"/>\n<wire x1=\"-0.635\" y1=\"2.54\" x2=\"-0.635\" y2=\"0\" width=\"0.4064\" layer=\"94\"/>\n<wire x1=\"-0.635\" y1=\"0\" x2=\"2.54\" y2=\"0\" width=\"0.1524\" layer=\"94\"/>\n<wire x1=\"-0.635\" y1=\"0\" x2=\"-0.635\" y2=\"-2.54\" width=\"0.4064\" layer=\"94\"/>\n<text x=\"-2.54\" y=\"3.175\" size=\"1.778\" layer=\"95\">&gt;NAME</text>\n<text x=\"-2.54\" y=\"-5.08\" size=\"1.778\" layer=\"96\">&gt;VALUE</text>\n<pin name=\"+\" x=\"5.08\" y=\"0\" visible=\"pad\" length=\"short\" direction=\"pas\" rot=\"R180\"/>\n<pin name=\"-\" x=\"-5.08\" y=\"0\" visible=\"pad\" length=\"short\" direction=\"pas\"/>\n<pin name=\"+@1\" x=\"2.54\" y=\"0\" visible=\"off\" length=\"point\" direction=\"pas\" rot=\"R180\"/>\n</symbol>\n</symbols>\n<devicesets>\n<deviceset name=\"CRAA\" prefix=\"G\">\n<description>&lt;b&gt;LI BATTERY&lt;/b&gt; Varta</description>\n<gates>\n<gate name=\"G$1\" symbol=\"1V2+2\" x=\"0\" y=\"0\"/>\n</gates>\n<devices>\n<device name=\"\" package=\"CRAA\">\n<connects>\n<connect gate=\"G$1\" pin=\"+\" pad=\"+\"/>\n<connect gate=\"G$1\" pin=\"+@1\" pad=\"+@1\"/>\n<connect gate=\"G$1\" pin=\"-\" pad=\"-\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n</devices>\n</deviceset>\n</devicesets>\n</library>\n<library name=\"supply1\">\n<description>&lt;b&gt;Supply Symbols&lt;/b&gt;&lt;p&gt;\n GND, VCC, 0V, +5V, -5V, etc.&lt;p&gt;\n Please keep in mind, that these devices are necessary for the\n automatic wiring of the supply signals.&lt;p&gt;\n The pin name defined in the symbol is identical to the net which is to be wired automatically.&lt;p&gt;\n In this library the device names are the same as the pin names of the symbols, therefore the correct signal names appear next to the supply symbols in the schematic.&lt;p&gt;\n &lt;author&gt;Created by librarian@cadsoft.de&lt;/author&gt;</description>\n<packages>\n</packages>\n<symbols>\n<symbol name=\"+12V\">\n<wire x1=\"1.27\" y1=\"-1.905\" x2=\"0\" y2=\"0\" width=\"0.254\" layer=\"94\"/>\n<wire x1=\"0\" y1=\"0\" x2=\"-1.27\" y2=\"-1.905\" width=\"0.254\" layer=\"94\"/>\n<wire x1=\"1.27\" y1=\"-0.635\" x2=\"0\" y2=\"1.27\" width=\"0.254\" layer=\"94\"/>\n<wire x1=\"0\" y1=\"1.27\" x2=\"-1.27\" y2=\"-0.635\" width=\"0.254\" layer=\"94\"/>\n<text x=\"-2.54\" y=\"-5.08\" size=\"1.778\" layer=\"96\" rot=\"R90\">&gt;VALUE</text>\n<pin name=\"+12V\" x=\"0\" y=\"-2.54\" visible=\"off\" length=\"short\" direction=\"sup\" rot=\"R90\"/>\n</symbol>\n<symbol name=\"GND\">\n<wire x1=\"-1.905\" y1=\"0\" x2=\"1.905\" y2=\"0\" width=\"0.254\" layer=\"94\"/>\n<text x=\"-2.54\" y=\"-2.54\" size=\"1.778\" layer=\"96\">&gt;VALUE</text>\n<pin name=\"GND\" x=\"0\" y=\"2.54\" visible=\"off\" length=\"short\" direction=\"sup\" rot=\"R270\"/>\n</symbol>\n</symbols>\n<devicesets>\n<deviceset name=\"+12V\" prefix=\"P+\">\n<description>&lt;b&gt;SUPPLY SYMBOL&lt;/b&gt;</description>\n<gates>\n<gate name=\"1\" symbol=\"+12V\" x=\"0\" y=\"0\"/>\n</gates>\n<devices>\n<device name=\"\">\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n</devices>\n</deviceset>\n<deviceset name=\"GND\" prefix=\"GND\">\n<description>&lt;b&gt;SUPPLY SYMBOL&lt;/b&gt;</description>\n<gates>\n<gate name=\"1\" symbol=\"GND\" x=\"0\" y=\"0\"/>\n</gates>\n<devices>\n<device name=\"\">\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n</devices>\n</deviceset>\n</devicesets>\n</library>\n<library name=\"SparkFun-Electromechanical\">\n<description>&lt;h3&gt;SparkFun Electronics' preferred foot prints&lt;/h3&gt;\nIn this library you'll find anything that moves- switches, relays, buttons, potentiometers. Also, anything that goes on a board but isn't electrical in nature- screws, standoffs, etc.&lt;br&gt;&lt;br&gt;\nWe've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com.\n&lt;br&gt;&lt;br&gt;\n&lt;b&gt;Licensing:&lt;/b&gt; Creative Commons ShareAlike 4.0 International - https://creativecommons.org/licenses/by-sa/4.0/ \n&lt;br&gt;&lt;br&gt;\nYou are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage.</description>\n<packages>\n<package name=\"SWITCH-SPDT\">\n<wire x1=\"2.175\" y1=\"5.815\" x2=\"-2.175\" y2=\"5.815\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-2.175\" y1=\"5.815\" x2=\"-2.175\" y2=\"-5.815\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-2.175\" y1=\"-5.815\" x2=\"2.175\" y2=\"-5.815\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"2.175\" y1=\"-5.815\" x2=\"2.175\" y2=\"5.815\" width=\"0.2032\" layer=\"21\"/>\n<pad name=\"1\" x=\"0\" y=\"2.54\" drill=\"1.016\" diameter=\"1.8796\"/>\n<pad name=\"2\" x=\"0\" y=\"0\" drill=\"1.016\" diameter=\"1.8796\"/>\n<pad name=\"3\" x=\"0\" y=\"-2.54\" drill=\"1.016\" diameter=\"1.8796\"/>\n<text x=\"-3.81\" y=\"7.62\" size=\"1.778\" layer=\"25\" ratio=\"10\">&gt;NAME</text>\n<text x=\"-3.81\" y=\"-9.525\" size=\"1.778\" layer=\"27\" ratio=\"10\">&gt;VALUE</text>\n</package>\n<package name=\"AYZ0202\">\n<description>&lt;b&gt;DPDT Slide Switch SMD&lt;/b&gt;\nwww.SparkFun.com SKU : Comp-SMDS</description>\n<wire x1=\"-3.6\" y1=\"1.75\" x2=\"-3.6\" y2=\"-1.75\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-3.6\" y1=\"-1.75\" x2=\"3.6\" y2=\"-1.75\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"3.6\" y1=\"-1.75\" x2=\"3.6\" y2=\"1.75\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"3.6\" y1=\"1.75\" x2=\"-3.6\" y2=\"1.75\" width=\"0.2032\" layer=\"21\"/>\n<smd name=\"3\" x=\"2.5\" y=\"2.825\" dx=\"1\" dy=\"1.15\" layer=\"1\"/>\n<smd name=\"2\" x=\"0\" y=\"2.825\" dx=\"1\" dy=\"1.15\" layer=\"1\"/>\n<smd name=\"1\" x=\"-2.5\" y=\"2.825\" dx=\"1\" dy=\"1.15\" layer=\"1\"/>\n<smd name=\"6\" x=\"2.5\" y=\"-2.825\" dx=\"1\" dy=\"1.15\" layer=\"1\"/>\n<smd name=\"5\" x=\"0\" y=\"-2.825\" dx=\"1\" dy=\"1.15\" layer=\"1\"/>\n<smd name=\"4\" x=\"-2.5\" y=\"-2.825\" dx=\"1\" dy=\"1.15\" layer=\"1\"/>\n<text x=\"-2.54\" y=\"1.143\" size=\"0.4064\" layer=\"25\">&gt;Name</text>\n<text x=\"0.508\" y=\"1.143\" size=\"0.4064\" layer=\"27\">&gt;Value</text>\n<hole x=\"1.5\" y=\"0\" drill=\"0.85\"/>\n<hole x=\"-1.5\" y=\"0\" drill=\"0.85\"/>\n</package>\n<package name=\"SWITCHE-DPDT\">\n<wire x1=\"8\" y1=\"3.25\" x2=\"-8\" y2=\"3.25\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"-8\" y1=\"3.25\" x2=\"-8\" y2=\"-3.25\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"-8\" y1=\"-3.25\" x2=\"8\" y2=\"-3.25\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"8\" y1=\"-3.25\" x2=\"8\" y2=\"3.25\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"-6\" y1=\"3.25\" x2=\"6\" y2=\"3.25\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"8\" y1=\"1\" x2=\"8\" y2=\"-1\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"6\" y1=\"-3.25\" x2=\"-6\" y2=\"-3.25\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-8\" y1=\"-1\" x2=\"-8\" y2=\"1\" width=\"0.2032\" layer=\"21\"/>\n<pad name=\"P$1\" x=\"-7.5\" y=\"3\" drill=\"1.5\" diameter=\"2.54\"/>\n<pad name=\"P$2\" x=\"-7.5\" y=\"-3\" drill=\"1.5\" diameter=\"2.54\"/>\n<pad name=\"P$3\" x=\"7.5\" y=\"3\" drill=\"1.5\" diameter=\"2.54\"/>\n<pad name=\"P$4\" x=\"7.5\" y=\"-3\" drill=\"1.5\" diameter=\"2.54\"/>\n<pad name=\"1\" x=\"-4\" y=\"1.25\" drill=\"0.7\" diameter=\"1.6764\"/>\n<pad name=\"2\" x=\"0\" y=\"1.25\" drill=\"0.7\" diameter=\"1.6764\"/>\n<pad name=\"3\" x=\"4\" y=\"1.25\" drill=\"0.7\" diameter=\"1.6764\"/>\n<pad name=\"4\" x=\"-4\" y=\"-1.25\" drill=\"0.7\" diameter=\"1.6764\"/>\n<pad name=\"5\" x=\"0\" y=\"-1.25\" drill=\"0.7\" diameter=\"1.6764\"/>\n<pad name=\"6\" x=\"4\" y=\"-1.25\" drill=\"0.7\" diameter=\"1.6764\"/>\n</package>\n<package name=\"R_SW_TH\">\n<wire x1=\"-1.651\" y1=\"19.2532\" x2=\"-1.651\" y2=\"-1.3716\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-1.651\" y1=\"-1.3716\" x2=\"-1.651\" y2=\"-2.2352\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-1.651\" y1=\"19.2532\" x2=\"13.589\" y2=\"19.2532\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"13.589\" y1=\"19.2532\" x2=\"13.589\" y2=\"-2.2352\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"13.589\" y1=\"-2.2352\" x2=\"-1.651\" y2=\"-2.2352\" width=\"0.2032\" layer=\"21\"/>\n<pad name=\"P$1\" x=\"0\" y=\"0\" drill=\"1.6002\"/>\n<pad name=\"P$2\" x=\"0\" y=\"16.9926\" drill=\"1.6002\"/>\n<pad name=\"P$3\" x=\"12.0904\" y=\"15.494\" drill=\"1.6002\"/>\n<pad name=\"P$4\" x=\"12.0904\" y=\"8.4582\" drill=\"1.6002\"/>\n</package>\n<package name=\"SWITCH-SPDT-SMD\">\n<wire x1=\"-4.5\" y1=\"1.75\" x2=\"-4.5\" y2=\"-1.75\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"-4.5\" y1=\"-1.75\" x2=\"4.5\" y2=\"-1.75\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"4.5\" y1=\"-1.75\" x2=\"4.5\" y2=\"1.75\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"4.5\" y1=\"1.75\" x2=\"2\" y2=\"1.75\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"2\" y1=\"1.75\" x2=\"0.5\" y2=\"1.75\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"0.5\" y1=\"1.75\" x2=\"-4.5\" y2=\"1.75\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"0.5\" y1=\"1.75\" x2=\"0.5\" y2=\"3.75\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"0.5\" y1=\"3.75\" x2=\"2\" y2=\"3.75\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"2\" y1=\"3.75\" x2=\"2\" y2=\"1.75\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"-4\" y1=\"-1.75\" x2=\"-4.5\" y2=\"-1.75\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-4.5\" y1=\"-1.75\" x2=\"-4.5\" y2=\"1.75\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-4.5\" y1=\"1.75\" x2=\"4.5\" y2=\"1.75\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"4.5\" y1=\"1.75\" x2=\"4.5\" y2=\"-1.75\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"4.5\" y1=\"-1.75\" x2=\"4\" y2=\"-1.75\" width=\"0.2032\" layer=\"21\"/>\n<smd name=\"1\" x=\"-2.5\" y=\"-2.75\" dx=\"1.2\" dy=\"2.5\" layer=\"1\" rot=\"R180\"/>\n<smd name=\"2\" x=\"0\" y=\"-2.75\" dx=\"1.2\" dy=\"2.5\" layer=\"1\" rot=\"R180\"/>\n<smd name=\"3\" x=\"2.5\" y=\"-2.75\" dx=\"1.2\" dy=\"2.5\" layer=\"1\" rot=\"R180\"/>\n<text x=\"-1.27\" y=\"0.635\" size=\"0.6096\" layer=\"25\">&gt;Name</text>\n<text x=\"-1.27\" y=\"-1.27\" size=\"0.6096\" layer=\"27\">&gt;Value</text>\n<hole x=\"-3.55\" y=\"0\" drill=\"0.9\"/>\n<hole x=\"3.55\" y=\"0\" drill=\"0.9\"/>\n</package>\n<package name=\"SWITCH-SPDT_LOCK.007S\">\n<wire x1=\"2.175\" y1=\"5.815\" x2=\"-2.175\" y2=\"5.815\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-2.175\" y1=\"5.815\" x2=\"-2.175\" y2=\"-5.815\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-2.175\" y1=\"-5.815\" x2=\"2.175\" y2=\"-5.815\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"2.175\" y1=\"-5.815\" x2=\"2.175\" y2=\"5.815\" width=\"0.2032\" layer=\"21\"/>\n<pad name=\"1\" x=\"0\" y=\"2.7178\" drill=\"1.016\" diameter=\"1.8796\"/>\n<pad name=\"2\" x=\"0\" y=\"0\" drill=\"1.016\" diameter=\"1.8796\"/>\n<pad name=\"3\" x=\"0\" y=\"-2.7178\" drill=\"1.016\" diameter=\"1.8796\"/>\n<text x=\"-3.81\" y=\"7.62\" size=\"1.778\" layer=\"25\" ratio=\"10\">&gt;NAME</text>\n<text x=\"-3.81\" y=\"-9.525\" size=\"1.778\" layer=\"27\" ratio=\"10\">&gt;VALUE</text>\n<rectangle x1=\"-0.2286\" y1=\"-0.3048\" x2=\"0.2286\" y2=\"0.3048\" layer=\"51\"/>\n<rectangle x1=\"-0.2286\" y1=\"2.2352\" x2=\"0.2286\" y2=\"2.8448\" layer=\"51\"/>\n<rectangle x1=\"-0.2286\" y1=\"-2.8448\" x2=\"0.2286\" y2=\"-2.2352\" layer=\"51\"/>\n</package>\n<package name=\"SWITCH-SPDT_KIT\">\n<description>&lt;h3&gt;SWITCH-SPDT_KIT&lt;/h3&gt;\nThrough-hole SPDT Switch&lt;br&gt;\n&lt;br&gt;\n&lt;b&gt;Warning:&lt;/b&gt; This is the KIT version of this package. This package has a smaller diameter top stop mask, which doesn't cover the diameter of the pad. This means only the bottom side of the pads' copper will be exposed. You'll only be able to solder to the bottom side.</description>\n<wire x1=\"2.175\" y1=\"5.815\" x2=\"-2.175\" y2=\"5.815\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-2.175\" y1=\"5.815\" x2=\"-2.175\" y2=\"-5.815\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-2.175\" y1=\"-5.815\" x2=\"2.175\" y2=\"-5.815\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"2.175\" y1=\"-5.815\" x2=\"2.175\" y2=\"5.815\" width=\"0.2032\" layer=\"21\"/>\n<pad name=\"1\" x=\"0\" y=\"2.7178\" drill=\"1.016\" diameter=\"1.8796\" stop=\"no\"/>\n<pad name=\"2\" x=\"0\" y=\"0\" drill=\"1.016\" diameter=\"1.8796\" stop=\"no\"/>\n<pad name=\"3\" x=\"0\" y=\"-2.7178\" drill=\"1.016\" diameter=\"1.8796\" stop=\"no\"/>\n<text x=\"-3.81\" y=\"7.62\" size=\"1.778\" layer=\"25\" ratio=\"10\">&gt;NAME</text>\n<text x=\"-3.81\" y=\"-9.525\" size=\"1.778\" layer=\"27\" ratio=\"10\">&gt;VALUE</text>\n<rectangle x1=\"-0.2286\" y1=\"-0.3048\" x2=\"0.2286\" y2=\"0.3048\" layer=\"51\"/>\n<rectangle x1=\"-0.2286\" y1=\"2.2352\" x2=\"0.2286\" y2=\"2.8448\" layer=\"51\"/>\n<rectangle x1=\"-0.2286\" y1=\"-2.8448\" x2=\"0.2286\" y2=\"-2.2352\" layer=\"51\"/>\n<polygon width=\"0.127\" layer=\"30\">\n<vertex x=\"-0.0178\" y=\"1.8414\" curve=\"-90.039946\"/>\n<vertex x=\"-0.8787\" y=\"2.6975\" curve=\"-90\"/>\n<vertex x=\"-0.0026\" y=\"3.5916\" curve=\"-90.006409\"/>\n<vertex x=\"0.8738\" y=\"2.6975\" curve=\"-90.03214\"/>\n</polygon>\n<polygon width=\"0.127\" layer=\"30\">\n<vertex x=\"-0.0051\" y=\"-3.5967\" curve=\"-90.006558\"/>\n<vertex x=\"-0.8788\" y=\"-2.7431\" curve=\"-90.037923\"/>\n<vertex x=\"0.0128\" y=\"-1.8363\" curve=\"-90.006318\"/>\n<vertex x=\"0.8814\" y=\"-2.7432\" curve=\"-90.038792\"/>\n</polygon>\n<polygon width=\"0.127\" layer=\"30\">\n<vertex x=\"-0.0102\" y=\"-0.8738\" curve=\"-90.019852\"/>\n<vertex x=\"-0.8762\" y=\"-0.0203\" curve=\"-90.019119\"/>\n<vertex x=\"0.0153\" y=\"0.8789\" curve=\"-90\"/>\n<vertex x=\"0.8739\" y=\"-0.0077\" curve=\"-90.038897\"/>\n</polygon>\n<polygon width=\"0.127\" layer=\"29\">\n<vertex x=\"0\" y=\"2.2758\" curve=\"-90.012891\"/>\n<vertex x=\"-0.4445\" y=\"2.7\" curve=\"-90\"/>\n<vertex x=\"0\" y=\"3.1673\" curve=\"-90\"/>\n<vertex x=\"0.4419\" y=\"2.7102\" curve=\"-90.012967\"/>\n</polygon>\n<polygon width=\"0.127\" layer=\"29\">\n<vertex x=\"0.0026\" y=\"-3.1648\" curve=\"-90.012891\"/>\n<vertex x=\"-0.4419\" y=\"-2.7406\" curve=\"-90\"/>\n<vertex x=\"0.0026\" y=\"-2.2733\" curve=\"-90\"/>\n<vertex x=\"0.4445\" y=\"-2.7304\" curve=\"-90.012967\"/>\n</polygon>\n<polygon width=\"0.127\" layer=\"29\">\n<vertex x=\"0.0102\" y=\"-0.4471\" curve=\"-90.012891\"/>\n<vertex x=\"-0.4343\" y=\"-0.0229\" curve=\"-90\"/>\n<vertex x=\"0.0102\" y=\"0.4444\" curve=\"-90\"/>\n<vertex x=\"0.4521\" y=\"-0.0127\" curve=\"-90.012967\"/>\n</polygon>\n</package>\n<package name=\"SWITCH-SPST-SMD-A\">\n<wire x1=\"-3.35\" y1=\"1.3\" x2=\"-3.35\" y2=\"-1.3\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"-3.35\" y1=\"-1.3\" x2=\"3.35\" y2=\"-1.3\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"3.35\" y1=\"-1.3\" x2=\"3.35\" y2=\"1.3\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"3.35\" y1=\"1.3\" x2=\"-0.1\" y2=\"1.3\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"-0.1\" y1=\"1.3\" x2=\"-1.4\" y2=\"1.3\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"-1.4\" y1=\"1.3\" x2=\"-3.35\" y2=\"1.3\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"-0.1\" y1=\"1.3\" x2=\"-0.1\" y2=\"2.8\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"-0.1\" y1=\"2.8\" x2=\"-1.4\" y2=\"2.8\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"-1.4\" y1=\"2.8\" x2=\"-1.4\" y2=\"1.3\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"-3.35\" y1=\"0.3\" x2=\"-3.35\" y2=\"-0.3\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"3.35\" y1=\"0.3\" x2=\"3.35\" y2=\"-0.3\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"2.7\" y1=\"1.3\" x2=\"-2.7\" y2=\"1.3\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"1.5\" y1=\"-1.3\" x2=\"0\" y2=\"-1.3\" width=\"0.2032\" layer=\"21\"/>\n<smd name=\"1\" x=\"-2.25\" y=\"-1.75\" dx=\"0.7\" dy=\"1.5\" layer=\"1\" rot=\"R180\"/>\n<smd name=\"2\" x=\"-0.75\" y=\"-1.75\" dx=\"0.7\" dy=\"1.5\" layer=\"1\" rot=\"R180\"/>\n<smd name=\"3\" x=\"2.25\" y=\"-1.75\" dx=\"0.7\" dy=\"1.5\" layer=\"1\" rot=\"R180\"/>\n<smd name=\"GND1\" x=\"-3.65\" y=\"1\" dx=\"1\" dy=\"0.6\" layer=\"1\"/>\n<smd name=\"GND2\" x=\"-3.65\" y=\"-1.1\" dx=\"1\" dy=\"0.8\" layer=\"1\"/>\n<smd name=\"GND3\" x=\"3.65\" y=\"1\" dx=\"1\" dy=\"0.6\" layer=\"1\"/>\n<smd name=\"GND4\" x=\"3.65\" y=\"-1.1\" dx=\"1\" dy=\"0.8\" layer=\"1\"/>\n<text x=\"-1.27\" y=\"0.635\" size=\"0.6096\" layer=\"25\">&gt;Name</text>\n<text x=\"-1.27\" y=\"-1.27\" size=\"0.6096\" layer=\"27\">&gt;Value</text>\n<hole x=\"-1.5\" y=\"0\" drill=\"0.9\"/>\n<hole x=\"1.5\" y=\"0\" drill=\"0.9\"/>\n</package>\n<package name=\"VIBE-MOTOR-10MM\">\n<wire x1=\"-1.5\" y1=\"-4.8\" x2=\"-1.5\" y2=\"-7.8\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"-1.5\" y1=\"-7.8\" x2=\"1.5\" y2=\"-7.8\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"1.5\" y1=\"-7.8\" x2=\"1.5\" y2=\"-4.8\" width=\"0.127\" layer=\"51\"/>\n<circle x=\"0\" y=\"0\" radius=\"5.0009\" width=\"0.127\" layer=\"51\"/>\n<pad name=\"+\" x=\"-5\" y=\"-3.9\" drill=\"0.8\" diameter=\"1.6764\"/>\n<pad name=\"-\" x=\"-6.35\" y=\"-2.54\" drill=\"0.8\" diameter=\"1.6764\"/>\n<text x=\"-6.8\" y=\"-2\" size=\"1.27\" layer=\"21\">-</text>\n<text x=\"-4.7\" y=\"-5.3\" size=\"1.27\" layer=\"21\">+</text>\n</package>\n<package name=\"BUZZER-12MM\">\n<description>&lt;b&gt;BUZZER&lt;/b&gt;</description>\n<circle x=\"0\" y=\"0\" radius=\"5.9\" width=\"0.2032\" layer=\"21\"/>\n<circle x=\"0\" y=\"0\" radius=\"1.27\" width=\"0.2032\" layer=\"51\"/>\n<pad name=\"-\" x=\"-3.25\" y=\"0\" drill=\"0.9\" diameter=\"1.778\"/>\n<pad name=\"+\" x=\"3.25\" y=\"0\" drill=\"0.9\" diameter=\"1.778\"/>\n<text x=\"-2.54\" y=\"2.54\" size=\"0.6096\" layer=\"25\" ratio=\"10\">&gt;NAME</text>\n<text x=\"-3.175\" y=\"-3.048\" size=\"0.6096\" layer=\"27\" ratio=\"10\">&gt;VALUE</text>\n</package>\n<package name=\"BUZZER-CMT1603\">\n<wire x1=\"-8\" y1=\"8\" x2=\"-8\" y2=\"-8\" width=\"0.127\" layer=\"21\"/>\n<wire x1=\"-8\" y1=\"-8\" x2=\"8\" y2=\"-8\" width=\"0.127\" layer=\"21\"/>\n<wire x1=\"8\" y1=\"-8\" x2=\"8\" y2=\"8\" width=\"0.127\" layer=\"21\"/>\n<wire x1=\"8\" y1=\"8\" x2=\"-8\" y2=\"8\" width=\"0.127\" layer=\"21\"/>\n<smd name=\"P$1\" x=\"-9.3\" y=\"0\" dx=\"2.5\" dy=\"3\" layer=\"1\"/>\n<smd name=\"P$2\" x=\"9.3\" y=\"0\" dx=\"2.5\" dy=\"3\" layer=\"1\"/>\n</package>\n<package name=\"BUZZER-CCV\">\n<wire x1=\"2.6\" y1=\"-6\" x2=\"-2.6\" y2=\"-6\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"2.6\" y1=\"-6\" x2=\"2.6\" y2=\"-3.7\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"-2.6\" y1=\"-6\" x2=\"-2.6\" y2=\"-3.7\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"-4.2\" y1=\"1.6\" x2=\"1.27\" y2=\"4.318\" width=\"0.2032\" layer=\"21\" curve=\"-86.141052\"/>\n<wire x1=\"3.048\" y1=\"3.302\" x2=\"4.191\" y2=\"1.651\" width=\"0.2032\" layer=\"21\" curve=\"-25.69541\"/>\n<wire x1=\"4.2\" y1=\"-1.6\" x2=\"2.6\" y2=\"-3.7\" width=\"0.2032\" layer=\"21\" curve=\"-31.605028\"/>\n<wire x1=\"-3.302\" y1=\"-3.048\" x2=\"-2.6\" y2=\"-3.6\" width=\"0.2032\" layer=\"21\" curve=\"12.917633\"/>\n<wire x1=\"-2.6\" y1=\"-6\" x2=\"2.6\" y2=\"-6\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"2.6\" y1=\"-6\" x2=\"2.6\" y2=\"-3.7\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-2.6\" y1=\"-6\" x2=\"-2.6\" y2=\"-3.6\" width=\"0.2032\" layer=\"21\"/>\n<circle x=\"0\" y=\"0\" radius=\"4.5\" width=\"0.127\" layer=\"51\"/>\n<smd name=\"-\" x=\"-4\" y=\"0\" dx=\"3.2\" dy=\"2.5\" layer=\"1\"/>\n<smd name=\"+\" x=\"4\" y=\"0\" dx=\"3.2\" dy=\"2.5\" layer=\"1\"/>\n<hole x=\"-3.9\" y=\"-2.25\" drill=\"0.8\"/>\n<hole x=\"2.25\" y=\"3.9\" drill=\"0.8\"/>\n</package>\n<package name=\"BUZZER-CMT1102\">\n<wire x1=\"-5.5\" y1=\"4.5\" x2=\"5.5\" y2=\"4.5\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"5.5\" y1=\"4.5\" x2=\"5.5\" y2=\"-4.5\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"5.5\" y1=\"-4.5\" x2=\"-5.5\" y2=\"-4.5\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"-5.5\" y1=\"-4.5\" x2=\"-5.5\" y2=\"4.5\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"-5.5\" y1=\"4.5\" x2=\"-5.5\" y2=\"2\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-5.5\" y1=\"4.5\" x2=\"5.5\" y2=\"4.5\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"5.5\" y1=\"4.5\" x2=\"5.5\" y2=\"2\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"5.5\" y1=\"-2\" x2=\"5.5\" y2=\"-4.5\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"5.5\" y1=\"-4.5\" x2=\"-5.5\" y2=\"-4.5\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-5.5\" y1=\"-4.5\" x2=\"-5.5\" y2=\"-2\" width=\"0.2032\" layer=\"21\"/>\n<smd name=\"1\" x=\"-6.5\" y=\"0\" dx=\"3\" dy=\"3\" layer=\"1\"/>\n<smd name=\"2\" x=\"6.5\" y=\"0\" dx=\"3\" dy=\"3\" layer=\"1\"/>\n</package>\n<package name=\"BUZZER-12MM-NS\">\n<circle x=\"0\" y=\"0\" radius=\"5.9\" width=\"0.2032\" layer=\"51\"/>\n<circle x=\"0\" y=\"0\" radius=\"1.27\" width=\"0.2032\" layer=\"51\"/>\n<pad name=\"-\" x=\"-3.25\" y=\"0\" drill=\"0.9\"/>\n<pad name=\"+\" x=\"3.25\" y=\"0\" drill=\"0.9\"/>\n<text x=\"-2.54\" y=\"2.54\" size=\"0.6096\" layer=\"25\" ratio=\"10\">&gt;NAME</text>\n<text x=\"-3.175\" y=\"-3.048\" size=\"0.6096\" layer=\"27\" ratio=\"10\">&gt;VALUE</text>\n<text x=\"2.667\" y=\"1.143\" size=\"1.778\" layer=\"51\">+</text>\n</package>\n<package name=\"BUZZER-12MM-NS-KIT\">\n<description>&lt;h3&gt;BUZZER-12MM-NS-KIT&lt;/h3&gt;\nThrough-hole buzzer&lt;br&gt;\n&lt;br&gt;\n&lt;b&gt;Warning:&lt;/b&gt; This is the KIT version of this package. This package has a smaller diameter top stop mask, which doesn't cover the diameter of the pad. This means only the bottom side of the pads' copper will be exposed. You'll only be able to solder to the bottom side.</description>\n<circle x=\"0\" y=\"0\" radius=\"5.9\" width=\"0.2032\" layer=\"51\"/>\n<circle x=\"0\" y=\"0\" radius=\"1.27\" width=\"0.2032\" layer=\"51\"/>\n<pad name=\"-\" x=\"-3.25\" y=\"0\" drill=\"0.9\" diameter=\"1.8796\" stop=\"no\"/>\n<pad name=\"+\" x=\"3.25\" y=\"0\" drill=\"0.9\" diameter=\"1.8796\" stop=\"no\"/>\n<text x=\"-2.54\" y=\"2.54\" size=\"0.6096\" layer=\"25\" ratio=\"10\">&gt;NAME</text>\n<text x=\"-3.175\" y=\"-3.048\" size=\"0.6096\" layer=\"27\" ratio=\"10\">&gt;VALUE</text>\n<text x=\"2.667\" y=\"1.143\" size=\"1.778\" layer=\"51\">+</text>\n<polygon width=\"0.127\" layer=\"30\">\n<vertex x=\"3.2537\" y=\"-0.9525\" curve=\"-90\"/>\n<vertex x=\"2.2988\" y=\"-0.0228\" curve=\"-90.011749\"/>\n<vertex x=\"3.2512\" y=\"0.9526\" curve=\"-90\"/>\n<vertex x=\"4.2012\" y=\"-0.0254\" curve=\"-90.024193\"/>\n</polygon>\n<polygon width=\"0.127\" layer=\"29\">\n<vertex x=\"3.2512\" y=\"-0.4445\" curve=\"-90.012891\"/>\n<vertex x=\"2.8067\" y=\"-0.0203\" curve=\"-90\"/>\n<vertex x=\"3.2512\" y=\"0.447\" curve=\"-90\"/>\n<vertex x=\"3.6931\" y=\"-0.0101\" curve=\"-90.012967\"/>\n</polygon>\n<polygon width=\"0.127\" layer=\"30\">\n<vertex x=\"-3.2487\" y=\"-0.9525\" curve=\"-90\"/>\n<vertex x=\"-4.2036\" y=\"-0.0228\" curve=\"-90.011749\"/>\n<vertex x=\"-3.2512\" y=\"0.9526\" curve=\"-90\"/>\n<vertex x=\"-2.3012\" y=\"-0.0254\" curve=\"-90.024193\"/>\n</polygon>\n<polygon width=\"0.127\" layer=\"29\">\n<vertex x=\"-3.2512\" y=\"-0.4445\" curve=\"-90.012891\"/>\n<vertex x=\"-3.6957\" y=\"-0.0203\" curve=\"-90\"/>\n<vertex x=\"-3.2512\" y=\"0.447\" curve=\"-90\"/>\n<vertex x=\"-2.8093\" y=\"-0.0101\" curve=\"-90.012967\"/>\n</polygon>\n</package>\n<package name=\"BUZZER-CCV-KIT\">\n<description>&lt;h3&gt;BUZZER-CCV-KIT&lt;/h3&gt;\nSMD Buzzer&lt;br&gt;\n&lt;br&gt;\n&lt;b&gt;Warning:&lt;/b&gt; This is the KIT version of this package. This package has longer pads to aid in hand soldering.</description>\n<wire x1=\"2.6\" y1=\"-6\" x2=\"-2.6\" y2=\"-6\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"2.6\" y1=\"-6\" x2=\"2.6\" y2=\"-3.7\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"-2.6\" y1=\"-6\" x2=\"-2.6\" y2=\"-3.7\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"-4.2\" y1=\"1.6\" x2=\"1.27\" y2=\"4.318\" width=\"0.2032\" layer=\"21\" curve=\"-86.141052\"/>\n<wire x1=\"3.048\" y1=\"3.302\" x2=\"4.191\" y2=\"1.651\" width=\"0.2032\" layer=\"21\" curve=\"-25.69541\"/>\n<wire x1=\"4.2\" y1=\"-1.6\" x2=\"2.6\" y2=\"-3.7\" width=\"0.2032\" layer=\"21\" curve=\"-31.605028\"/>\n<wire x1=\"-3.302\" y1=\"-3.048\" x2=\"-2.6\" y2=\"-3.6\" width=\"0.2032\" layer=\"21\" curve=\"12.917633\"/>\n<wire x1=\"-2.6\" y1=\"-6\" x2=\"2.6\" y2=\"-6\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"2.6\" y1=\"-6\" x2=\"2.6\" y2=\"-3.7\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-2.6\" y1=\"-6\" x2=\"-2.6\" y2=\"-3.6\" width=\"0.2032\" layer=\"21\"/>\n<circle x=\"0\" y=\"0\" radius=\"4.5\" width=\"0.127\" layer=\"51\"/>\n<smd name=\"-\" x=\"-4.15\" y=\"0\" dx=\"3.5\" dy=\"2\" layer=\"1\"/>\n<smd name=\"+\" x=\"4.15\" y=\"0\" dx=\"3.5\" dy=\"2\" layer=\"1\"/>\n<rectangle x1=\"-5.2\" y1=\"-0.75\" x2=\"-2.9\" y2=\"0.75\" layer=\"51\"/>\n<rectangle x1=\"2.9\" y1=\"-0.75\" x2=\"5.2\" y2=\"0.75\" layer=\"51\" rot=\"R180\"/>\n<hole x=\"-3.9\" y=\"-2.25\" drill=\"0.8\"/>\n<hole x=\"2.25\" y=\"3.9\" drill=\"0.8\"/>\n</package>\n<package name=\"BUZZER-12MM-KIT\">\n<circle x=\"0\" y=\"0\" radius=\"5.9\" width=\"0.2032\" layer=\"21\"/>\n<circle x=\"0\" y=\"0\" radius=\"1.27\" width=\"0.2032\" layer=\"51\"/>\n<pad name=\"-\" x=\"-3.25\" y=\"0\" drill=\"0.9\" diameter=\"1.8796\" stop=\"no\"/>\n<pad name=\"+\" x=\"3.25\" y=\"0\" drill=\"0.9\" diameter=\"1.8796\" stop=\"no\"/>\n<text x=\"-2.54\" y=\"2.54\" size=\"0.6096\" layer=\"25\" ratio=\"10\">&gt;NAME</text>\n<text x=\"-3.175\" y=\"-3.048\" size=\"0.6096\" layer=\"27\" ratio=\"10\">&gt;VALUE</text>\n<text x=\"2.667\" y=\"1.143\" size=\"1.778\" layer=\"51\">+</text>\n<polygon width=\"0.127\" layer=\"30\">\n<vertex x=\"3.2537\" y=\"-0.9525\" curve=\"-90\"/>\n<vertex x=\"2.2988\" y=\"-0.0228\" curve=\"-90.011749\"/>\n<vertex x=\"3.2512\" y=\"0.9526\" curve=\"-90\"/>\n<vertex x=\"4.2012\" y=\"-0.0254\" curve=\"-90.024193\"/>\n</polygon>\n<polygon width=\"0.127\" layer=\"29\">\n<vertex x=\"3.2512\" y=\"-0.4445\" curve=\"-90.012891\"/>\n<vertex x=\"2.8067\" y=\"-0.0203\" curve=\"-90\"/>\n<vertex x=\"3.2512\" y=\"0.447\" curve=\"-90\"/>\n<vertex x=\"3.6931\" y=\"-0.0101\" curve=\"-90.012967\"/>\n</polygon>\n<polygon width=\"0.127\" layer=\"30\">\n<vertex x=\"-3.2487\" y=\"-0.9525\" curve=\"-90\"/>\n<vertex x=\"-4.2036\" y=\"-0.0228\" curve=\"-90.011749\"/>\n<vertex x=\"-3.2512\" y=\"0.9526\" curve=\"-90\"/>\n<vertex x=\"-2.3012\" y=\"-0.0254\" curve=\"-90.024193\"/>\n</polygon>\n<polygon width=\"0.127\" layer=\"29\">\n<vertex x=\"-3.2512\" y=\"-0.4445\" curve=\"-90.012891\"/>\n<vertex x=\"-3.6957\" y=\"-0.0203\" curve=\"-90\"/>\n<vertex x=\"-3.2512\" y=\"0.447\" curve=\"-90\"/>\n<vertex x=\"-2.8093\" y=\"-0.0101\" curve=\"-90.012967\"/>\n</polygon>\n</package>\n</packages>\n<symbols>\n<symbol name=\"TOGGLE\">\n<wire x1=\"0\" y1=\"0\" x2=\"2.54\" y2=\"1.27\" width=\"0.254\" layer=\"94\"/>\n<wire x1=\"2.54\" y1=\"-2.54\" x2=\"3.175\" y2=\"-2.54\" width=\"0.127\" layer=\"94\"/>\n<wire x1=\"2.54\" y1=\"2.54\" x2=\"3.175\" y2=\"2.54\" width=\"0.1524\" layer=\"94\"/>\n<circle x=\"2.54\" y=\"2.54\" radius=\"0.3592\" width=\"0.2032\" layer=\"94\"/>\n<circle x=\"2.54\" y=\"-2.54\" radius=\"0.3592\" width=\"0.2032\" layer=\"94\"/>\n<circle x=\"0\" y=\"0\" radius=\"0.3592\" width=\"0.2032\" layer=\"94\"/>\n<text x=\"-1.905\" y=\"-6.35\" size=\"1.778\" layer=\"95\">&gt;NAME</text>\n<text x=\"-2.54\" y=\"3.81\" size=\"1.778\" layer=\"96\">&gt;VALUE</text>\n<pin name=\"P\" x=\"-2.54\" y=\"0\" visible=\"off\" length=\"short\" direction=\"pas\"/>\n<pin name=\"S\" x=\"5.08\" y=\"-2.54\" visible=\"off\" length=\"short\" direction=\"pas\" rot=\"R180\"/>\n<pin name=\"O\" x=\"5.08\" y=\"2.54\" visible=\"off\" length=\"short\" direction=\"pas\" rot=\"R180\"/>\n</symbol>\n<symbol name=\"MOTOR\">\n<wire x1=\"-1.27\" y1=\"3.81\" x2=\"-1.27\" y2=\"1.778\" width=\"0.2032\" layer=\"94\"/>\n<wire x1=\"-1.27\" y1=\"3.81\" x2=\"0\" y2=\"3.81\" width=\"0.2032\" layer=\"94\"/>\n<wire x1=\"0\" y1=\"3.81\" x2=\"1.27\" y2=\"3.81\" width=\"0.2032\" layer=\"94\"/>\n<wire x1=\"1.27\" y1=\"3.81\" x2=\"1.27\" y2=\"1.778\" width=\"0.2032\" layer=\"94\"/>\n<wire x1=\"1.27\" y1=\"-3.81\" x2=\"1.27\" y2=\"-1.778\" width=\"0.2032\" layer=\"94\"/>\n<wire x1=\"1.27\" y1=\"-3.81\" x2=\"0\" y2=\"-3.81\" width=\"0.2032\" layer=\"94\"/>\n<wire x1=\"0\" y1=\"-3.81\" x2=\"-1.27\" y2=\"-3.81\" width=\"0.2032\" layer=\"94\"/>\n<wire x1=\"-1.27\" y1=\"-3.81\" x2=\"-1.27\" y2=\"-1.778\" width=\"0.2032\" layer=\"94\"/>\n<wire x1=\"0\" y1=\"5.08\" x2=\"0\" y2=\"3.81\" width=\"0.1524\" layer=\"94\"/>\n<wire x1=\"0\" y1=\"-5.08\" x2=\"0\" y2=\"-3.81\" width=\"0.1524\" layer=\"94\"/>\n<wire x1=\"0.254\" y1=\"3.302\" x2=\"-0.254\" y2=\"3.302\" width=\"0.1524\" layer=\"94\"/>\n<wire x1=\"0\" y1=\"3.556\" x2=\"0\" y2=\"3.048\" width=\"0.1524\" layer=\"94\"/>\n<wire x1=\"0.254\" y1=\"-3.302\" x2=\"-0.254\" y2=\"-3.302\" width=\"0.1524\" layer=\"94\"/>\n<circle x=\"0\" y=\"0\" radius=\"2.032\" width=\"0.254\" layer=\"94\"/>\n<text x=\"2.54\" y=\"0\" size=\"1.778\" layer=\"95\">&gt;NAME</text>\n<text x=\"2.54\" y=\"-2.54\" size=\"1.778\" layer=\"96\">&gt;VALUE</text>\n<pin name=\"+\" x=\"0\" y=\"5.08\" visible=\"off\" length=\"point\" rot=\"R270\"/>\n<pin name=\"-\" x=\"0\" y=\"-5.08\" visible=\"off\" length=\"point\" rot=\"R270\"/>\n</symbol>\n<symbol name=\"BUZZER\">\n<wire x1=\"-1.27\" y1=\"1.905\" x2=\"0\" y2=\"1.905\" width=\"0.1524\" layer=\"94\"/>\n<wire x1=\"0\" y1=\"1.905\" x2=\"0\" y2=\"2.54\" width=\"0.1524\" layer=\"94\"/>\n<wire x1=\"0\" y1=\"1.905\" x2=\"0\" y2=\"1.27\" width=\"0.1524\" layer=\"94\"/>\n<wire x1=\"0.635\" y1=\"3.175\" x2=\"0.635\" y2=\"0.635\" width=\"0.1524\" layer=\"94\"/>\n<wire x1=\"0.635\" y1=\"0.635\" x2=\"1.905\" y2=\"0.635\" width=\"0.1524\" layer=\"94\"/>\n<wire x1=\"1.905\" y1=\"0.635\" x2=\"1.905\" y2=\"3.175\" width=\"0.1524\" layer=\"94\"/>\n<wire x1=\"1.905\" y1=\"3.175\" x2=\"0.635\" y2=\"3.175\" width=\"0.1524\" layer=\"94\"/>\n<wire x1=\"2.54\" y1=\"2.54\" x2=\"2.54\" y2=\"1.905\" width=\"0.1524\" layer=\"94\"/>\n<wire x1=\"2.54\" y1=\"1.905\" x2=\"3.81\" y2=\"1.905\" width=\"0.1524\" layer=\"94\"/>\n<wire x1=\"2.54\" y1=\"1.905\" x2=\"2.54\" y2=\"1.27\" width=\"0.1524\" layer=\"94\"/>\n<wire x1=\"5.08\" y1=\"0\" x2=\"5.08\" y2=\"3.81\" width=\"0.254\" layer=\"94\"/>\n<wire x1=\"5.08\" y1=\"3.81\" x2=\"5.715\" y2=\"3.81\" width=\"0.254\" layer=\"94\"/>\n<wire x1=\"5.715\" y1=\"3.81\" x2=\"5.715\" y2=\"4.445\" width=\"0.254\" layer=\"94\"/>\n<wire x1=\"5.715\" y1=\"4.445\" x2=\"-3.175\" y2=\"4.445\" width=\"0.254\" layer=\"94\"/>\n<wire x1=\"-3.175\" y1=\"4.445\" x2=\"-3.175\" y2=\"3.81\" width=\"0.254\" layer=\"94\"/>\n<wire x1=\"-3.175\" y1=\"3.81\" x2=\"-2.54\" y2=\"3.81\" width=\"0.254\" layer=\"94\"/>\n<wire x1=\"-2.54\" y1=\"3.81\" x2=\"-2.54\" y2=\"0\" width=\"0.254\" layer=\"94\"/>\n<wire x1=\"-2.54\" y1=\"3.81\" x2=\"5.08\" y2=\"3.81\" width=\"0.254\" layer=\"94\"/>\n<wire x1=\"-2.54\" y1=\"0\" x2=\"5.08\" y2=\"0\" width=\"0.254\" layer=\"94\"/>\n<text x=\"-2.54\" y=\"5.08\" size=\"1.778\" layer=\"95\">&gt;NAME</text>\n<text x=\"6.35\" y=\"0\" size=\"1.778\" layer=\"96\">&gt;VALUE</text>\n<pin name=\"2\" x=\"2.54\" y=\"-2.54\" visible=\"off\" length=\"short\" direction=\"pas\" rot=\"R90\"/>\n<pin name=\"1\" x=\"0\" y=\"-2.54\" visible=\"off\" length=\"short\" direction=\"pas\" rot=\"R90\"/>\n</symbol>\n</symbols>\n<devicesets>\n<deviceset name=\"SWITCH-SPDT\" prefix=\"S\" uservalue=\"yes\">\n<description>&lt;b&gt;SPDT Switch&lt;/b&gt;&lt;br&gt;\nSimple slide switch, Spark Fun Electronics SKU : COM-00102&lt;br&gt;\nDPDT SMT slide switch, AYZ0202, SWCH-08179</description>\n<gates>\n<gate name=\"1\" symbol=\"TOGGLE\" x=\"-2.54\" y=\"0\"/>\n</gates>\n<devices>\n<device name=\"PTH\" package=\"SWITCH-SPDT\">\n<connects>\n<connect gate=\"1\" pin=\"O\" pad=\"1\"/>\n<connect gate=\"1\" pin=\"P\" pad=\"2\"/>\n<connect gate=\"1\" pin=\"S\" pad=\"3\"/>\n</connects>\n<technologies>\n<technology name=\"\">\n<attribute name=\"PROD_ID\" value=\"SWCH-08261\"/>\n</technology>\n</technologies>\n</device>\n<device name=\"SMD\" package=\"AYZ0202\">\n<connects>\n<connect gate=\"1\" pin=\"O\" pad=\"1\"/>\n<connect gate=\"1\" pin=\"P\" pad=\"2\"/>\n<connect gate=\"1\" pin=\"S\" pad=\"3\"/>\n</connects>\n<technologies>\n<technology name=\"\">\n<attribute name=\"PROD_ID\" value=\"SWCH-08179\" constant=\"no\"/>\n<attribute name=\"SF_ID\" value=\"COM-00597\" constant=\"no\"/>\n</technology>\n</technologies>\n</device>\n<device name=\"PTH2\" package=\"SWITCHE-DPDT\">\n<connects>\n<connect gate=\"1\" pin=\"O\" pad=\"1\"/>\n<connect gate=\"1\" pin=\"P\" pad=\"2\"/>\n<connect gate=\"1\" pin=\"S\" pad=\"3\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n<device name=\"PTH3\" package=\"R_SW_TH\">\n<connects>\n<connect gate=\"1\" pin=\"O\" pad=\"P$1\"/>\n<connect gate=\"1\" pin=\"P\" pad=\"P$2\"/>\n<connect gate=\"1\" pin=\"S\" pad=\"P$3\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n<device name=\"SMD2\" package=\"SWITCH-SPDT-SMD\">\n<connects>\n<connect gate=\"1\" pin=\"O\" pad=\"1\"/>\n<connect gate=\"1\" pin=\"P\" pad=\"2\"/>\n<connect gate=\"1\" pin=\"S\" pad=\"3\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n<device name=\"PTH_LOCK\" package=\"SWITCH-SPDT_LOCK.007S\">\n<connects>\n<connect gate=\"1\" pin=\"O\" pad=\"1\"/>\n<connect gate=\"1\" pin=\"P\" pad=\"2\"/>\n<connect gate=\"1\" pin=\"S\" pad=\"3\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n<device name=\"KIT\" package=\"SWITCH-SPDT_KIT\">\n<connects>\n<connect gate=\"1\" pin=\"O\" pad=\"1\"/>\n<connect gate=\"1\" pin=\"P\" pad=\"2\"/>\n<connect gate=\"1\" pin=\"S\" pad=\"3\"/>\n</connects>\n<technologies>\n<technology name=\"\">\n<attribute name=\"PROD_ID\" value=\"SWCH-08261\" constant=\"no\"/>\n</technology>\n</technologies>\n</device>\n<device name=\"-SMD-A\" package=\"SWITCH-SPST-SMD-A\">\n<connects>\n<connect gate=\"1\" pin=\"O\" pad=\"1\"/>\n<connect gate=\"1\" pin=\"P\" pad=\"2\"/>\n<connect gate=\"1\" pin=\"S\" pad=\"3\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n</devices>\n</deviceset>\n<deviceset name=\"MOTOR\">\n<description>&lt;b&gt;Vibration Motor- ROB-08449&lt;/b&gt;\nPhysical dimension and wire connections for this powerful vibration motor. Motor has a self adhesive backing.</description>\n<gates>\n<gate name=\"G$1\" symbol=\"MOTOR\" x=\"0\" y=\"0\"/>\n</gates>\n<devices>\n<device name=\"10MM\" package=\"VIBE-MOTOR-10MM\">\n<connects>\n<connect gate=\"G$1\" pin=\"+\" pad=\"+\"/>\n<connect gate=\"G$1\" pin=\"-\" pad=\"-\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n</devices>\n</deviceset>\n<deviceset name=\"BUZZER\" prefix=\"SG\">\n<description>&lt;b&gt;Buzzer 12mm&lt;/b&gt;\nSpark Fun Electronics SKU : Comp-Buzzer</description>\n<gates>\n<gate name=\"G$1\" symbol=\"BUZZER\" x=\"0\" y=\"0\"/>\n</gates>\n<devices>\n<device name=\"PTH\" package=\"BUZZER-12MM\">\n<connects>\n<connect gate=\"G$1\" pin=\"1\" pad=\"+\"/>\n<connect gate=\"G$1\" pin=\"2\" pad=\"-\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n<device name=\"SMD\" package=\"BUZZER-CMT1603\">\n<connects>\n<connect gate=\"G$1\" pin=\"1\" pad=\"P$1\"/>\n<connect gate=\"G$1\" pin=\"2\" pad=\"P$2\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n<device name=\"SMD2\" package=\"BUZZER-CCV\">\n<connects>\n<connect gate=\"G$1\" pin=\"1\" pad=\"+\"/>\n<connect gate=\"G$1\" pin=\"2\" pad=\"-\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n<device name=\"SMD3\" package=\"BUZZER-CMT1102\">\n<connects>\n<connect gate=\"G$1\" pin=\"1\" pad=\"1\"/>\n<connect gate=\"G$1\" pin=\"2\" pad=\"2\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n<device name=\"NS\" package=\"BUZZER-12MM-NS\">\n<connects>\n<connect gate=\"G$1\" pin=\"1\" pad=\"+\"/>\n<connect gate=\"G$1\" pin=\"2\" pad=\"-\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n<device name=\"PTH-NS-KIT\" package=\"BUZZER-12MM-NS-KIT\">\n<connects>\n<connect gate=\"G$1\" pin=\"1\" pad=\"+\"/>\n<connect gate=\"G$1\" pin=\"2\" pad=\"-\"/>\n</connects>\n<technologies>\n<technology name=\"\">\n<attribute name=\"PROD_ID\" value=\"COMP-08253\" constant=\"no\"/>\n</technology>\n</technologies>\n</device>\n<device name=\"SMD2-KIT\" package=\"BUZZER-CCV-KIT\">\n<connects>\n<connect gate=\"G$1\" pin=\"1\" pad=\"+\"/>\n<connect gate=\"G$1\" pin=\"2\" pad=\"-\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n<device name=\"PTH-KIT\" package=\"BUZZER-12MM-KIT\">\n<connects>\n<connect gate=\"G$1\" pin=\"1\" pad=\"+\"/>\n<connect gate=\"G$1\" pin=\"2\" pad=\"-\"/>\n</connects>\n<technologies>\n<technology name=\"\">\n<attribute name=\"PROD_ID\" value=\"COMP-08253\" constant=\"no\"/>\n</technology>\n</technologies>\n</device>\n</devices>\n</deviceset>\n</devicesets>\n</library>\n<library name=\"SparkFun-PowerIC\">\n<description>&lt;h3&gt;SparkFun Electronics' preferred foot prints&lt;/h3&gt;\nIn this library you'll find drivers, regulators, and amplifiers.&lt;br&gt;&lt;br&gt;\nWe've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com.\n&lt;br&gt;&lt;br&gt;\n&lt;b&gt;Licensing:&lt;/b&gt; Creative Commons ShareAlike 4.0 International - https://creativecommons.org/licenses/by-sa/4.0/ \n&lt;br&gt;&lt;br&gt;\nYou are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage.</description>\n<packages>\n<package name=\"SSOP24\">\n<wire x1=\"-4.25\" y1=\"2.5\" x2=\"4.25\" y2=\"2.5\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"4.25\" y1=\"2.5\" x2=\"4.25\" y2=\"-2.5\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"4.25\" y1=\"-2.5\" x2=\"-4.25\" y2=\"-2.5\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-4.25\" y1=\"-2.5\" x2=\"-4.25\" y2=\"2.5\" width=\"0.2032\" layer=\"21\"/>\n<circle x=\"-4.826\" y=\"-3.048\" radius=\"0.2231\" width=\"0.2032\" layer=\"21\"/>\n<smd name=\"24\" x=\"-3.575\" y=\"3.656\" dx=\"0.348\" dy=\"1.397\" layer=\"1\"/>\n<smd name=\"23\" x=\"-2.925\" y=\"3.656\" dx=\"0.348\" dy=\"1.397\" layer=\"1\"/>\n<smd name=\"22\" x=\"-2.275\" y=\"3.656\" dx=\"0.348\" dy=\"1.397\" layer=\"1\"/>\n<smd name=\"20\" x=\"-0.975\" y=\"3.656\" dx=\"0.348\" dy=\"1.397\" layer=\"1\"/>\n<smd name=\"21\" x=\"-1.625\" y=\"3.656\" dx=\"0.348\" dy=\"1.397\" layer=\"1\"/>\n<smd name=\"19\" x=\"-0.325\" y=\"3.656\" dx=\"0.348\" dy=\"1.397\" layer=\"1\"/>\n<smd name=\"18\" x=\"0.325\" y=\"3.656\" dx=\"0.348\" dy=\"1.397\" layer=\"1\"/>\n<smd name=\"17\" x=\"0.975\" y=\"3.656\" dx=\"0.348\" dy=\"1.397\" layer=\"1\"/>\n<smd name=\"16\" x=\"1.625\" y=\"3.656\" dx=\"0.348\" dy=\"1.397\" layer=\"1\"/>\n<smd name=\"15\" x=\"2.275\" y=\"3.656\" dx=\"0.348\" dy=\"1.397\" layer=\"1\"/>\n<smd name=\"1\" x=\"-3.575\" y=\"-3.656\" dx=\"0.348\" dy=\"1.397\" layer=\"1\"/>\n<smd name=\"2\" x=\"-2.925\" y=\"-3.656\" dx=\"0.348\" dy=\"1.397\" layer=\"1\"/>\n<smd name=\"3\" x=\"-2.275\" y=\"-3.656\" dx=\"0.348\" dy=\"1.397\" layer=\"1\"/>\n<smd name=\"4\" x=\"-1.625\" y=\"-3.656\" dx=\"0.348\" dy=\"1.397\" layer=\"1\"/>\n<smd name=\"5\" x=\"-0.975\" y=\"-3.656\" dx=\"0.348\" dy=\"1.397\" layer=\"1\"/>\n<smd name=\"6\" x=\"-0.325\" y=\"-3.656\" dx=\"0.348\" dy=\"1.397\" layer=\"1\"/>\n<smd name=\"7\" x=\"0.325\" y=\"-3.656\" dx=\"0.348\" dy=\"1.397\" layer=\"1\"/>\n<smd name=\"8\" x=\"0.975\" y=\"-3.656\" dx=\"0.348\" dy=\"1.397\" layer=\"1\"/>\n<smd name=\"9\" x=\"1.625\" y=\"-3.656\" dx=\"0.348\" dy=\"1.397\" layer=\"1\"/>\n<smd name=\"10\" x=\"2.275\" y=\"-3.656\" dx=\"0.348\" dy=\"1.397\" layer=\"1\"/>\n<smd name=\"11\" x=\"2.925\" y=\"-3.656\" dx=\"0.348\" dy=\"1.397\" layer=\"1\"/>\n<smd name=\"12\" x=\"3.575\" y=\"-3.656\" dx=\"0.348\" dy=\"1.397\" layer=\"1\"/>\n<smd name=\"13\" x=\"3.575\" y=\"3.656\" dx=\"0.348\" dy=\"1.397\" layer=\"1\" rot=\"R180\"/>\n<smd name=\"14\" x=\"2.925\" y=\"3.656\" dx=\"0.348\" dy=\"1.397\" layer=\"1\" rot=\"R180\"/>\n<text x=\"-3.81\" y=\"1.27\" size=\"0.4064\" layer=\"25\">&gt;NAME</text>\n<text x=\"-3.81\" y=\"0\" size=\"0.4064\" layer=\"27\">&gt;VALUE</text>\n</package>\n</packages>\n<symbols>\n<symbol name=\"TB6612FNG\">\n<wire x1=\"-12.7\" y1=\"-17.78\" x2=\"10.16\" y2=\"-17.78\" width=\"0.4064\" layer=\"94\"/>\n<wire x1=\"10.16\" y1=\"-17.78\" x2=\"10.16\" y2=\"15.24\" width=\"0.4064\" layer=\"94\"/>\n<wire x1=\"10.16\" y1=\"15.24\" x2=\"-12.7\" y2=\"15.24\" width=\"0.6096\" layer=\"94\"/>\n<wire x1=\"-12.7\" y1=\"15.24\" x2=\"-12.7\" y2=\"-17.78\" width=\"0.4064\" layer=\"94\"/>\n<text x=\"-10.16\" y=\"16.51\" size=\"1.778\" layer=\"95\">&gt;NAME</text>\n<text x=\"-10.16\" y=\"-20.32\" size=\"1.778\" layer=\"96\">&gt;VALUE</text>\n<pin name=\"MA1\" x=\"-15.24\" y=\"5.08\" visible=\"pin\" length=\"short\" direction=\"out\"/>\n<pin name=\"PGND1\" x=\"-15.24\" y=\"0\" visible=\"pin\" length=\"short\" direction=\"pwr\"/>\n<pin name=\"MA2\" x=\"-15.24\" y=\"2.54\" visible=\"pin\" length=\"short\" direction=\"out\"/>\n<pin name=\"MB2\" x=\"-15.24\" y=\"-5.08\" visible=\"pin\" length=\"short\" direction=\"out\" swaplevel=\"1\"/>\n<pin name=\"PGND2\" x=\"-15.24\" y=\"-2.54\" visible=\"pin\" length=\"short\" direction=\"pwr\"/>\n<pin name=\"MB1\" x=\"-15.24\" y=\"-7.62\" visible=\"pin\" length=\"short\" direction=\"out\" swaplevel=\"1\"/>\n<pin name=\"PWMB\" x=\"12.7\" y=\"-5.08\" visible=\"pin\" length=\"short\" direction=\"in\" swaplevel=\"1\" rot=\"R180\"/>\n<pin name=\"BIN2\" x=\"12.7\" y=\"-2.54\" visible=\"pin\" length=\"short\" direction=\"in\" swaplevel=\"1\" rot=\"R180\"/>\n<pin name=\"BIN1\" x=\"12.7\" y=\"0\" visible=\"pin\" length=\"short\" direction=\"in\" swaplevel=\"1\" rot=\"R180\"/>\n<pin name=\"GND\" x=\"12.7\" y=\"-7.62\" visible=\"pin\" length=\"short\" direction=\"pwr\" rot=\"R180\"/>\n<pin name=\"STBY\" x=\"12.7\" y=\"2.54\" visible=\"pin\" length=\"short\" rot=\"R180\"/>\n<pin name=\"VCC\" x=\"12.7\" y=\"-10.16\" visible=\"pin\" length=\"short\" direction=\"pwr\" rot=\"R180\"/>\n<pin name=\"AIN1\" x=\"12.7\" y=\"5.08\" visible=\"pin\" length=\"short\" direction=\"in\" rot=\"R180\"/>\n<pin name=\"AIN2\" x=\"12.7\" y=\"7.62\" visible=\"pin\" length=\"short\" direction=\"in\" rot=\"R180\"/>\n<pin name=\"PWMA\" x=\"12.7\" y=\"10.16\" visible=\"pin\" length=\"short\" direction=\"in\" rot=\"R180\"/>\n<pin name=\"VM\" x=\"12.7\" y=\"-12.7\" visible=\"pin\" length=\"short\" direction=\"pwr\" rot=\"R180\"/>\n<pin name=\"VM+\" x=\"7.62\" y=\"-20.32\" visible=\"off\" length=\"short\" direction=\"pwr\" rot=\"R90\"/>\n<pin name=\"VM-\" x=\"5.08\" y=\"-20.32\" visible=\"off\" length=\"short\" direction=\"pwr\" rot=\"R90\"/>\n</symbol>\n</symbols>\n<devicesets>\n<deviceset name=\"TB6612FNG\">\n<description>Toshiba 1A dual motor driver\nIC-09363</description>\n<gates>\n<gate name=\"G$1\" symbol=\"TB6612FNG\" x=\"0\" y=\"0\"/>\n</gates>\n<devices>\n<device name=\"\" package=\"SSOP24\">\n<connects>\n<connect gate=\"G$1\" pin=\"AIN1\" pad=\"21\"/>\n<connect gate=\"G$1\" pin=\"AIN2\" pad=\"22\"/>\n<connect gate=\"G$1\" pin=\"BIN1\" pad=\"17\"/>\n<connect gate=\"G$1\" pin=\"BIN2\" pad=\"16\"/>\n<connect gate=\"G$1\" pin=\"GND\" pad=\"18\"/>\n<connect gate=\"G$1\" pin=\"MA1\" pad=\"1\"/>\n<connect gate=\"G$1\" pin=\"MA2\" pad=\"5\"/>\n<connect gate=\"G$1\" pin=\"MB1\" pad=\"11\"/>\n<connect gate=\"G$1\" pin=\"MB2\" pad=\"7\"/>\n<connect gate=\"G$1\" pin=\"PGND1\" pad=\"3\"/>\n<connect gate=\"G$1\" pin=\"PGND2\" pad=\"9\"/>\n<connect gate=\"G$1\" pin=\"PWMA\" pad=\"23\"/>\n<connect gate=\"G$1\" pin=\"PWMB\" pad=\"15\"/>\n<connect gate=\"G$1\" pin=\"STBY\" pad=\"19\"/>\n<connect gate=\"G$1\" pin=\"VCC\" pad=\"20\"/>\n<connect gate=\"G$1\" pin=\"VM\" pad=\"24\"/>\n<connect gate=\"G$1\" pin=\"VM+\" pad=\"13\"/>\n<connect gate=\"G$1\" pin=\"VM-\" pad=\"10\"/>\n</connects>\n<technologies>\n<technology name=\"\">\n<attribute name=\"PROD_ID\" value=\"IC-09363\"/>\n<attribute name=\"VALUE\" value=\"TB6612FNG\"/>\n</technology>\n</technologies>\n</device>\n</devices>\n</deviceset>\n</devicesets>\n</library>\n<library name=\"switch-coto\">\n<description>&lt;b&gt;COTO TECHNOLOGY&lt;/b&gt;&lt;p&gt;\nReed switch&lt;br&gt;\n&lt;author&gt;Created by librarian@cadsoft.de&lt;/author&gt;</description>\n<packages>\n<package name=\"CT10-XXXX-A2\">\n<description>&lt;b&gt;CT10 Series Molded Switch&lt;/b&gt;&lt;p&gt;\nSource: www.cotorelay.com .. Coto_Technology__CT10-1530-G1.pdf</description>\n<wire x1=\"-6.275\" y1=\"1.1\" x2=\"6.3\" y2=\"1.1\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"6.3\" y1=\"1.1\" x2=\"6.3\" y2=\"-1.1\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"6.3\" y1=\"-1.1\" x2=\"-6.3\" y2=\"-1.1\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-6.3\" y1=\"-1.1\" x2=\"-6.3\" y2=\"1.1\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-6.5\" y1=\"-1.3\" x2=\"-6.5\" y2=\"1.3\" width=\"0\" layer=\"20\"/>\n<wire x1=\"-6.5\" y1=\"1.3\" x2=\"6.5\" y2=\"1.3\" width=\"0\" layer=\"20\"/>\n<wire x1=\"6.5\" y1=\"1.3\" x2=\"6.5\" y2=\"-1.3\" width=\"0\" layer=\"20\"/>\n<wire x1=\"6.5\" y1=\"-1.3\" x2=\"-6.5\" y2=\"-1.3\" width=\"0\" layer=\"20\"/>\n<smd name=\"1\" x=\"-7.5\" y=\"0\" dx=\"1.8\" dy=\"1.8\" layer=\"1\"/>\n<smd name=\"2\" x=\"7.5\" y=\"0\" dx=\"1.8\" dy=\"1.8\" layer=\"1\"/>\n<text x=\"-8.32\" y=\"1.3302\" size=\"1.27\" layer=\"25\">&gt;NAME</text>\n<text x=\"-8.32\" y=\"-3.1082\" size=\"1.27\" layer=\"27\">&gt;VALUE</text>\n<rectangle x1=\"-7.85\" y1=\"-0.575\" x2=\"-6.25\" y2=\"0.575\" layer=\"51\"/>\n<rectangle x1=\"6.3\" y1=\"-0.575\" x2=\"7.85\" y2=\"0.575\" layer=\"51\"/>\n</package>\n<package name=\"CT10-XXXX-G1\">\n<description>&lt;b&gt;CT10 Series Molded Switch&lt;/b&gt;&lt;p&gt;\nSource: www.cotorelay.com .. Coto_Technology__CT10-1530-G1.pdf</description>\n<wire x1=\"-6.275\" y1=\"1.1\" x2=\"6.3\" y2=\"1.1\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"6.3\" y1=\"1.1\" x2=\"6.3\" y2=\"-1.1\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"6.3\" y1=\"-1.1\" x2=\"-6.3\" y2=\"-1.1\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-6.3\" y1=\"-1.1\" x2=\"-6.3\" y2=\"1.1\" width=\"0.2032\" layer=\"21\"/>\n<smd name=\"1\" x=\"-7.625\" y=\"0\" dx=\"1.8\" dy=\"1.8\" layer=\"1\"/>\n<smd name=\"2\" x=\"7.625\" y=\"0\" dx=\"1.8\" dy=\"1.8\" layer=\"1\"/>\n<text x=\"-8.32\" y=\"1.3302\" size=\"1.27\" layer=\"25\">&gt;NAME</text>\n<text x=\"-8.32\" y=\"-3.1082\" size=\"1.27\" layer=\"27\">&gt;VALUE</text>\n<rectangle x1=\"-8.2\" y1=\"-0.575\" x2=\"-6.4\" y2=\"0.575\" layer=\"51\"/>\n<rectangle x1=\"6.4\" y1=\"-0.575\" x2=\"8.2\" y2=\"0.575\" layer=\"51\"/>\n</package>\n<package name=\"CT10-XXXX-G4\">\n<description>&lt;b&gt;CT10 Series Molded Switch&lt;/b&gt;&lt;p&gt;\nSource: www.cotorelay.com .. Coto_Technology__CT10-1530-G1.pdf</description>\n<wire x1=\"-6.275\" y1=\"1.1\" x2=\"6.3\" y2=\"1.1\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"6.3\" y1=\"1.1\" x2=\"6.3\" y2=\"-1.1\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"6.3\" y1=\"-1.1\" x2=\"-6.3\" y2=\"-1.1\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-6.3\" y1=\"-1.1\" x2=\"-6.3\" y2=\"1.1\" width=\"0.2032\" layer=\"21\"/>\n<smd name=\"1\" x=\"-9.2\" y=\"0\" dx=\"1.8\" dy=\"1.8\" layer=\"1\"/>\n<smd name=\"2\" x=\"9.225\" y=\"0\" dx=\"1.8\" dy=\"1.8\" layer=\"1\"/>\n<text x=\"-8.32\" y=\"1.3302\" size=\"1.27\" layer=\"25\">&gt;NAME</text>\n<text x=\"-8.32\" y=\"-3.1082\" size=\"1.27\" layer=\"27\">&gt;VALUE</text>\n<rectangle x1=\"-9.8\" y1=\"-0.575\" x2=\"-6.4\" y2=\"0.575\" layer=\"51\"/>\n<rectangle x1=\"6.4\" y1=\"-0.575\" x2=\"9.8\" y2=\"0.575\" layer=\"51\"/>\n</package>\n</packages>\n<symbols>\n<symbol name=\"SWITCH-NO\">\n<wire x1=\"-2.54\" y1=\"0\" x2=\"2.54\" y2=\"0.889\" width=\"0.254\" layer=\"94\"/>\n<circle x=\"-2.54\" y=\"0\" radius=\"0.2839\" width=\"0\" layer=\"94\"/>\n<circle x=\"2.54\" y=\"0\" radius=\"0.2839\" width=\"0\" layer=\"94\"/>\n<text x=\"-3.81\" y=\"2.54\" size=\"1.778\" layer=\"95\">&gt;NAME</text>\n<text x=\"-3.81\" y=\"-3.81\" size=\"1.778\" layer=\"96\">&gt;VALUE</text>\n<pin name=\"1\" x=\"-5.08\" y=\"0\" visible=\"pad\" length=\"short\" direction=\"pas\"/>\n<pin name=\"2\" x=\"5.08\" y=\"0\" visible=\"pad\" length=\"short\" direction=\"pas\" rot=\"R180\"/>\n</symbol>\n</symbols>\n<devicesets>\n<deviceset name=\"CT10-XXXX-\" prefix=\"SW\">\n<description>&lt;b&gt;CT10 Series Molded Switch&lt;/b&gt;&lt;p&gt;\nSource: www.cotorelay.com .. Coto_Technology__CT10-1530-G1.pdf</description>\n<gates>\n<gate name=\"G$1\" symbol=\"SWITCH-NO\" x=\"0\" y=\"0\"/>\n</gates>\n<devices>\n<device name=\"A2\" package=\"CT10-XXXX-A2\">\n<connects>\n<connect gate=\"G$1\" pin=\"1\" pad=\"1\"/>\n<connect gate=\"G$1\" pin=\"2\" pad=\"2\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n<device name=\"G1\" package=\"CT10-XXXX-G1\">\n<connects>\n<connect gate=\"G$1\" pin=\"1\" pad=\"1\"/>\n<connect gate=\"G$1\" pin=\"2\" pad=\"2\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n<device name=\"G4\" package=\"CT10-XXXX-G4\">\n<connects>\n<connect gate=\"G$1\" pin=\"1\" pad=\"1\"/>\n<connect gate=\"G$1\" pin=\"2\" pad=\"2\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n</devices>\n</deviceset>\n</devicesets>\n</library>\n<library name=\"SparkFun-Resistors\">\n<description>&lt;h3&gt;SparkFun Electronics' preferred foot prints&lt;/h3&gt;\nIn this library you'll find resistors, capacitors, inductors, test points, jumper pads, etc.&lt;br&gt;&lt;br&gt;\nWe've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com.\n&lt;br&gt;&lt;br&gt;\n&lt;b&gt;Licensing:&lt;/b&gt; Creative Commons ShareAlike 4.0 International - https://creativecommons.org/licenses/by-sa/4.0/ \n&lt;br&gt;&lt;br&gt;\nYou are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage.</description>\n<packages>\n<package name=\"0603-RES\">\n<wire x1=\"-1.6002\" y1=\"0.6858\" x2=\"1.6002\" y2=\"0.6858\" width=\"0.0508\" layer=\"39\"/>\n<wire x1=\"1.6002\" y1=\"0.6858\" x2=\"1.6002\" y2=\"-0.6858\" width=\"0.0508\" layer=\"39\"/>\n<wire x1=\"1.6002\" y1=\"-0.6858\" x2=\"-1.6002\" y2=\"-0.6858\" width=\"0.0508\" layer=\"39\"/>\n<wire x1=\"-1.6002\" y1=\"-0.6858\" x2=\"-1.6002\" y2=\"0.6858\" width=\"0.0508\" layer=\"39\"/>\n<wire x1=\"-0.356\" y1=\"0.432\" x2=\"0.356\" y2=\"0.432\" width=\"0.1016\" layer=\"51\"/>\n<wire x1=\"-0.356\" y1=\"-0.419\" x2=\"0.356\" y2=\"-0.419\" width=\"0.1016\" layer=\"51\"/>\n<smd name=\"1\" x=\"-0.85\" y=\"0\" dx=\"1.1\" dy=\"1\" layer=\"1\"/>\n<smd name=\"2\" x=\"0.85\" y=\"0\" dx=\"1.1\" dy=\"1\" layer=\"1\"/>\n<text x=\"-0.889\" y=\"0.762\" size=\"0.4064\" layer=\"25\" font=\"vector\">&gt;NAME</text>\n<text x=\"-1.016\" y=\"-1.143\" size=\"0.4064\" layer=\"27\" font=\"vector\">&gt;VALUE</text>\n<rectangle x1=\"-0.8382\" y1=\"-0.4699\" x2=\"-0.3381\" y2=\"0.4801\" layer=\"51\"/>\n<rectangle x1=\"0.3302\" y1=\"-0.4699\" x2=\"0.8303\" y2=\"0.4801\" layer=\"51\"/>\n<rectangle x1=\"-0.1999\" y1=\"-0.3\" x2=\"0.1999\" y2=\"0.3\" layer=\"35\"/>\n<rectangle x1=\"-0.1905\" y1=\"-0.381\" x2=\"0.1905\" y2=\"0.381\" layer=\"21\"/>\n</package>\n</packages>\n<symbols>\n<symbol name=\"RESISTOR\">\n<wire x1=\"-2.54\" y1=\"0\" x2=\"-2.159\" y2=\"1.016\" width=\"0.1524\" layer=\"94\"/>\n<wire x1=\"-2.159\" y1=\"1.016\" x2=\"-1.524\" y2=\"-1.016\" width=\"0.1524\" layer=\"94\"/>\n<wire x1=\"-1.524\" y1=\"-1.016\" x2=\"-0.889\" y2=\"1.016\" width=\"0.1524\" layer=\"94\"/>\n<wire x1=\"-0.889\" y1=\"1.016\" x2=\"-0.254\" y2=\"-1.016\" width=\"0.1524\" layer=\"94\"/>\n<wire x1=\"-0.254\" y1=\"-1.016\" x2=\"0.381\" y2=\"1.016\" width=\"0.1524\" layer=\"94\"/>\n<wire x1=\"0.381\" y1=\"1.016\" x2=\"1.016\" y2=\"-1.016\" width=\"0.1524\" layer=\"94\"/>\n<wire x1=\"1.016\" y1=\"-1.016\" x2=\"1.651\" y2=\"1.016\" width=\"0.1524\" layer=\"94\"/>\n<wire x1=\"1.651\" y1=\"1.016\" x2=\"2.286\" y2=\"-1.016\" width=\"0.1524\" layer=\"94\"/>\n<wire x1=\"2.286\" y1=\"-1.016\" x2=\"2.54\" y2=\"0\" width=\"0.1524\" layer=\"94\"/>\n<text x=\"-3.81\" y=\"1.4986\" size=\"1.778\" layer=\"95\">&gt;NAME</text>\n<text x=\"-3.81\" y=\"-3.302\" size=\"1.778\" layer=\"96\">&gt;VALUE</text>\n<pin name=\"2\" x=\"5.08\" y=\"0\" visible=\"off\" length=\"short\" direction=\"pas\" swaplevel=\"1\" rot=\"R180\"/>\n<pin name=\"1\" x=\"-5.08\" y=\"0\" visible=\"off\" length=\"short\" direction=\"pas\" swaplevel=\"1\"/>\n</symbol>\n</symbols>\n<devicesets>\n<deviceset name=\"680OHM1/10W5%(0603)\" prefix=\"R\" uservalue=\"yes\">\n<description>RES-09333</description>\n<gates>\n<gate name=\"G$1\" symbol=\"RESISTOR\" x=\"0\" y=\"0\"/>\n</gates>\n<devices>\n<device name=\"\" package=\"0603-RES\">\n<connects>\n<connect gate=\"G$1\" pin=\"1\" pad=\"1\"/>\n<connect gate=\"G$1\" pin=\"2\" pad=\"2\"/>\n</connects>\n<technologies>\n<technology name=\"\">\n<attribute name=\"PROD_ID\" value=\"RES-09333\"/>\n<attribute name=\"VALUE\" value=\"680\" constant=\"no\"/>\n</technology>\n</technologies>\n</device>\n</devices>\n</deviceset>\n</devicesets>\n</library>\n<library name=\"SparkFun-Boards\">\n<description>&lt;h3&gt;SparkFun Electronics' preferred foot prints&lt;/h3&gt;\nIn this library you'll find boards and modules: Arduino footprints, breadboards, non-RF modules, etc.&lt;br&gt;&lt;br&gt;\nWe've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com.\n&lt;br&gt;&lt;br&gt;\n&lt;b&gt;Licensing:&lt;/b&gt; Creative Commons ShareAlike 4.0 International - https://creativecommons.org/licenses/by-sa/4.0/ \n&lt;br&gt;&lt;br&gt;\nYou are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage.</description>\n<packages>\n<package name=\"ARDUINO_R3\">\n<description>Arduino Uno Footprint R3</description>\n<wire x1=\"0\" y1=\"0\" x2=\"0\" y2=\"53.34\" width=\"0.2032\" layer=\"51\"/>\n<wire x1=\"0\" y1=\"53.34\" x2=\"64.516\" y2=\"53.34\" width=\"0.2032\" layer=\"51\"/>\n<wire x1=\"64.516\" y1=\"53.34\" x2=\"66.04\" y2=\"51.816\" width=\"0.2032\" layer=\"51\"/>\n<wire x1=\"66.04\" y1=\"51.816\" x2=\"66.04\" y2=\"40.386\" width=\"0.2032\" layer=\"51\"/>\n<wire x1=\"66.04\" y1=\"40.386\" x2=\"68.58\" y2=\"37.846\" width=\"0.2032\" layer=\"51\"/>\n<wire x1=\"68.58\" y1=\"37.846\" x2=\"68.58\" y2=\"5.08\" width=\"0.2032\" layer=\"51\"/>\n<wire x1=\"68.58\" y1=\"5.08\" x2=\"66.04\" y2=\"2.54\" width=\"0.2032\" layer=\"51\"/>\n<wire x1=\"66.04\" y1=\"2.54\" x2=\"66.04\" y2=\"0\" width=\"0.2032\" layer=\"51\"/>\n<wire x1=\"66.04\" y1=\"0\" x2=\"0\" y2=\"0\" width=\"0.2032\" layer=\"51\"/>\n<hole x=\"15.24\" y=\"50.8\" drill=\"3.175\"/>\n<hole x=\"66.04\" y=\"35.56\" drill=\"3.175\"/>\n<hole x=\"66.04\" y=\"7.62\" drill=\"3.175\"/>\n<hole x=\"13.97\" y=\"2.54\" drill=\"3.175\"/>\n<pad name=\"NC\" x=\"27.94\" y=\"2.54\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"IOREF\" x=\"30.48\" y=\"2.54\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"RESET@1\" x=\"33.02\" y=\"2.54\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"3.3V\" x=\"35.56\" y=\"2.54\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"5V\" x=\"38.1\" y=\"2.54\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"GND@1\" x=\"40.64\" y=\"2.54\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"GND@2\" x=\"43.18\" y=\"2.54\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"VIN\" x=\"45.72\" y=\"2.54\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"A0\" x=\"50.8\" y=\"2.54\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"A1\" x=\"53.34\" y=\"2.54\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"A2\" x=\"55.88\" y=\"2.54\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"A3\" x=\"58.42\" y=\"2.54\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"A4\" x=\"60.96\" y=\"2.54\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"A5\" x=\"63.5\" y=\"2.54\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"D0\" x=\"63.5\" y=\"50.8\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"D1\" x=\"60.96\" y=\"50.8\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"D2\" x=\"58.42\" y=\"50.8\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"D3\" x=\"55.88\" y=\"50.8\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"D4\" x=\"53.34\" y=\"50.8\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"D5\" x=\"50.8\" y=\"50.8\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"D6\" x=\"48.26\" y=\"50.8\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"D7\" x=\"45.72\" y=\"50.8\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"D8\" x=\"41.656\" y=\"50.8\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"D9\" x=\"39.116\" y=\"50.8\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"D10\" x=\"36.576\" y=\"50.8\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"D11\" x=\"34.036\" y=\"50.8\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"D12\" x=\"31.496\" y=\"50.8\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"D13\" x=\"28.956\" y=\"50.8\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"GND@3\" x=\"26.416\" y=\"50.8\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"AREF\" x=\"23.876\" y=\"50.8\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"SDA\" x=\"21.336\" y=\"50.8\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"SCL\" x=\"18.796\" y=\"50.8\" drill=\"1.016\" diameter=\"1.9304\"/>\n<wire x1=\"-6.35\" y1=\"43.815\" x2=\"9.525\" y2=\"43.815\" width=\"0.2032\" layer=\"51\"/>\n<wire x1=\"9.525\" y1=\"43.815\" x2=\"9.525\" y2=\"32.385\" width=\"0.2032\" layer=\"51\"/>\n<wire x1=\"9.525\" y1=\"32.385\" x2=\"-6.35\" y2=\"32.385\" width=\"0.2032\" layer=\"51\"/>\n<wire x1=\"-6.35\" y1=\"32.385\" x2=\"-6.35\" y2=\"43.815\" width=\"0.2032\" layer=\"51\"/>\n<wire x1=\"-1.905\" y1=\"3.175\" x2=\"-1.905\" y2=\"12.065\" width=\"0.2032\" layer=\"51\"/>\n<wire x1=\"-1.905\" y1=\"12.065\" x2=\"11.43\" y2=\"12.065\" width=\"0.2032\" layer=\"51\"/>\n<wire x1=\"11.43\" y1=\"12.065\" x2=\"11.43\" y2=\"3.175\" width=\"0.2032\" layer=\"51\"/>\n<wire x1=\"11.43\" y1=\"3.175\" x2=\"-1.905\" y2=\"3.175\" width=\"0.2032\" layer=\"51\"/>\n<pad name=\"MISO\" x=\"63.64000625\" y=\"30.4299875\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"VCC\" x=\"66.18000625\" y=\"30.4299875\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"SCK\" x=\"63.64000625\" y=\"27.8899875\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"MOSI\" x=\"66.18000625\" y=\"27.8899875\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"RESET@2\" x=\"63.64000625\" y=\"25.3499875\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"GND@4\" x=\"66.18000625\" y=\"25.3499875\" drill=\"1.016\" diameter=\"1.9304\"/>\n<text x=\"18.796\" y=\"49.53\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-right\">SCL</text>\n<text x=\"21.336\" y=\"49.53\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-right\">SDA</text>\n<text x=\"23.876\" y=\"49.53\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-right\">AREF</text>\n<text x=\"26.416\" y=\"49.53\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-right\">GND</text>\n<text x=\"28.956\" y=\"49.53\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-right\">D13</text>\n<text x=\"31.496\" y=\"49.53\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-right\">D12</text>\n<text x=\"34.036\" y=\"49.53\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-right\">D11</text>\n<text x=\"36.576\" y=\"49.53\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-right\">D10</text>\n<text x=\"39.116\" y=\"49.53\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-right\">D9</text>\n<text x=\"41.656\" y=\"49.53\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-right\">D8</text>\n<text x=\"45.72\" y=\"49.53\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-right\">D7</text>\n<text x=\"48.26\" y=\"49.53\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-right\">D6</text>\n<text x=\"50.8\" y=\"49.53\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-right\">D5</text>\n<text x=\"53.34\" y=\"49.53\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-right\">D4</text>\n<text x=\"55.88\" y=\"49.53\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-right\">D3</text>\n<text x=\"58.42\" y=\"49.53\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-right\">D2</text>\n<text x=\"63.5\" y=\"49.53\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-right\">D0/RXI</text>\n<text x=\"60.96\" y=\"49.53\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-right\">D1/TXO</text>\n<text x=\"33.02\" y=\"3.81\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-left\">!RESET!</text>\n<text x=\"35.56\" y=\"3.81\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-left\">3.3V</text>\n<text x=\"38.1\" y=\"3.81\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-left\">5V</text>\n<text x=\"40.64\" y=\"3.81\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-left\">GND</text>\n<text x=\"43.18\" y=\"3.81\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-left\">GND</text>\n<text x=\"45.72\" y=\"3.81\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-left\">VIN</text>\n<text x=\"50.8\" y=\"3.81\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-left\">A0</text>\n<text x=\"53.34\" y=\"3.81\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-left\">A1</text>\n<text x=\"55.88\" y=\"3.81\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-left\">A2</text>\n<text x=\"58.42\" y=\"3.81\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-left\">A3</text>\n<text x=\"60.96\" y=\"3.81\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-left\">A4</text>\n<text x=\"63.5\" y=\"3.81\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-left\">A5</text>\n<text x=\"30.48\" y=\"3.81\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-left\">IOREF</text>\n<text x=\"62.23\" y=\"30.48\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" align=\"center-right\">MISO</text>\n<text x=\"62.23\" y=\"27.94\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" align=\"center-right\">SCK</text>\n<text x=\"62.23\" y=\"25.4\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" align=\"center-right\">RST</text>\n<text x=\"67.31\" y=\"25.4\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"top-center\">GND</text>\n<text x=\"67.31\" y=\"27.94\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"top-center\">MOSI</text>\n<text x=\"67.31\" y=\"30.48\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"top-center\">5V</text>\n</package>\n<package name=\"ARDUINO_R3_NO_HOLES\">\n<wire x1=\"0\" y1=\"0\" x2=\"0\" y2=\"53.34\" width=\"0.2032\" layer=\"51\"/>\n<wire x1=\"0\" y1=\"53.34\" x2=\"64.516\" y2=\"53.34\" width=\"0.2032\" layer=\"51\"/>\n<wire x1=\"64.516\" y1=\"53.34\" x2=\"66.04\" y2=\"51.816\" width=\"0.2032\" layer=\"51\"/>\n<wire x1=\"66.04\" y1=\"51.816\" x2=\"66.04\" y2=\"40.386\" width=\"0.2032\" layer=\"51\"/>\n<wire x1=\"66.04\" y1=\"40.386\" x2=\"68.58\" y2=\"37.846\" width=\"0.2032\" layer=\"51\"/>\n<wire x1=\"68.58\" y1=\"37.846\" x2=\"68.58\" y2=\"5.08\" width=\"0.2032\" layer=\"51\"/>\n<wire x1=\"68.58\" y1=\"5.08\" x2=\"66.04\" y2=\"2.54\" width=\"0.2032\" layer=\"51\"/>\n<wire x1=\"66.04\" y1=\"2.54\" x2=\"66.04\" y2=\"0\" width=\"0.2032\" layer=\"51\"/>\n<wire x1=\"66.04\" y1=\"0\" x2=\"0\" y2=\"0\" width=\"0.2032\" layer=\"51\"/>\n<pad name=\"NC\" x=\"27.94\" y=\"2.54\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"IOREF\" x=\"30.48\" y=\"2.54\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"RESET@1\" x=\"33.02\" y=\"2.54\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"3.3V\" x=\"35.56\" y=\"2.54\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"5V\" x=\"38.1\" y=\"2.54\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"GND@1\" x=\"40.64\" y=\"2.54\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"GND@2\" x=\"43.18\" y=\"2.54\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"VIN\" x=\"45.72\" y=\"2.54\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"A0\" x=\"50.8\" y=\"2.54\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"A1\" x=\"53.34\" y=\"2.54\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"A2\" x=\"55.88\" y=\"2.54\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"A3\" x=\"58.42\" y=\"2.54\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"A4\" x=\"60.96\" y=\"2.54\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"A5\" x=\"63.5\" y=\"2.54\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"D0\" x=\"63.5\" y=\"50.8\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"D1\" x=\"60.96\" y=\"50.8\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"D2\" x=\"58.42\" y=\"50.8\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"D3\" x=\"55.88\" y=\"50.8\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"D4\" x=\"53.34\" y=\"50.8\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"D5\" x=\"50.8\" y=\"50.8\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"D6\" x=\"48.26\" y=\"50.8\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"D7\" x=\"45.72\" y=\"50.8\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"D8\" x=\"41.656\" y=\"50.8\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"D9\" x=\"39.116\" y=\"50.8\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"D10\" x=\"36.576\" y=\"50.8\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"D11\" x=\"34.036\" y=\"50.8\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"D12\" x=\"31.496\" y=\"50.8\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"D13\" x=\"28.956\" y=\"50.8\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"GND@3\" x=\"26.416\" y=\"50.8\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"AREF\" x=\"23.876\" y=\"50.8\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"SDA\" x=\"21.336\" y=\"50.8\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"SCL\" x=\"18.796\" y=\"50.8\" drill=\"1.016\" diameter=\"1.9304\"/>\n<wire x1=\"-6.35\" y1=\"43.815\" x2=\"9.525\" y2=\"43.815\" width=\"0.2032\" layer=\"51\"/>\n<wire x1=\"9.525\" y1=\"43.815\" x2=\"9.525\" y2=\"32.385\" width=\"0.2032\" layer=\"51\"/>\n<wire x1=\"9.525\" y1=\"32.385\" x2=\"-6.35\" y2=\"32.385\" width=\"0.2032\" layer=\"51\"/>\n<wire x1=\"-6.35\" y1=\"32.385\" x2=\"-6.35\" y2=\"43.815\" width=\"0.2032\" layer=\"51\"/>\n<wire x1=\"-1.905\" y1=\"3.175\" x2=\"-1.905\" y2=\"12.065\" width=\"0.2032\" layer=\"51\"/>\n<wire x1=\"-1.905\" y1=\"12.065\" x2=\"11.43\" y2=\"12.065\" width=\"0.2032\" layer=\"51\"/>\n<wire x1=\"11.43\" y1=\"12.065\" x2=\"11.43\" y2=\"3.175\" width=\"0.2032\" layer=\"51\"/>\n<wire x1=\"11.43\" y1=\"3.175\" x2=\"-1.905\" y2=\"3.175\" width=\"0.2032\" layer=\"51\"/>\n<pad name=\"MISO\" x=\"63.64000625\" y=\"30.4299875\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"VCC\" x=\"66.18000625\" y=\"30.4299875\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"SCK\" x=\"63.64000625\" y=\"27.8899875\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"MOSI\" x=\"66.18000625\" y=\"27.8899875\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"RESET@2\" x=\"63.64000625\" y=\"25.3499875\" drill=\"1.016\" diameter=\"1.9304\"/>\n<pad name=\"GND@4\" x=\"66.18000625\" y=\"25.3499875\" drill=\"1.016\" diameter=\"1.9304\"/>\n<text x=\"18.796\" y=\"49.53\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-right\">SCL</text>\n<text x=\"21.336\" y=\"49.53\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-right\">SDA</text>\n<text x=\"23.876\" y=\"49.53\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-right\">AREF</text>\n<text x=\"26.416\" y=\"49.53\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-right\">GND</text>\n<text x=\"28.956\" y=\"49.53\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-right\">D13</text>\n<text x=\"31.496\" y=\"49.53\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-right\">D12</text>\n<text x=\"34.036\" y=\"49.53\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-right\">D11</text>\n<text x=\"36.576\" y=\"49.53\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-right\">D10</text>\n<text x=\"39.116\" y=\"49.53\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-right\">D9</text>\n<text x=\"41.656\" y=\"49.53\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-right\">D8</text>\n<text x=\"45.72\" y=\"49.53\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-right\">D7</text>\n<text x=\"48.26\" y=\"49.53\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-right\">D6</text>\n<text x=\"50.8\" y=\"49.53\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-right\">D5</text>\n<text x=\"53.34\" y=\"49.53\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-right\">D4</text>\n<text x=\"55.88\" y=\"49.53\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-right\">D3</text>\n<text x=\"58.42\" y=\"49.53\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-right\">D2</text>\n<text x=\"63.5\" y=\"49.53\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-right\">D0/RXI</text>\n<text x=\"60.96\" y=\"49.53\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-right\">D1/TXO</text>\n<text x=\"33.02\" y=\"3.81\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-left\">!RESET!</text>\n<text x=\"35.56\" y=\"3.81\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-left\">3.3V</text>\n<text x=\"38.1\" y=\"3.81\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-left\">5V</text>\n<text x=\"40.64\" y=\"3.81\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-left\">GND</text>\n<text x=\"43.18\" y=\"3.81\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-left\">GND</text>\n<text x=\"45.72\" y=\"3.81\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-left\">VIN</text>\n<text x=\"50.8\" y=\"3.81\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-left\">A0</text>\n<text x=\"53.34\" y=\"3.81\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-left\">A1</text>\n<text x=\"55.88\" y=\"3.81\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-left\">A2</text>\n<text x=\"58.42\" y=\"3.81\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-left\">A3</text>\n<text x=\"60.96\" y=\"3.81\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-left\">A4</text>\n<text x=\"63.5\" y=\"3.81\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-left\">A5</text>\n<text x=\"30.48\" y=\"3.81\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"center-left\">IOREF</text>\n<text x=\"62.23\" y=\"30.48\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" align=\"center-right\">MISO</text>\n<text x=\"62.23\" y=\"27.94\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" align=\"center-right\">SCK</text>\n<text x=\"62.23\" y=\"25.4\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" align=\"center-right\">RST</text>\n<text x=\"67.31\" y=\"25.4\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"top-center\">GND</text>\n<text x=\"67.31\" y=\"27.94\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"top-center\">MOSI</text>\n<text x=\"67.31\" y=\"30.48\" size=\"0.8128\" layer=\"51\" font=\"vector\" ratio=\"15\" rot=\"R90\" align=\"top-center\">5V</text>\n<circle x=\"13.97\" y=\"2.54\" radius=\"1.02390625\" width=\"0.127\" layer=\"51\"/>\n<circle x=\"66.04\" y=\"7.62\" radius=\"1.02390625\" width=\"0.127\" layer=\"51\"/>\n<circle x=\"66.04\" y=\"35.56\" radius=\"1.02390625\" width=\"0.127\" layer=\"51\"/>\n<circle x=\"15.24\" y=\"50.8\" radius=\"1.02390625\" width=\"0.127\" layer=\"51\"/>\n</package>\n</packages>\n<symbols>\n<symbol name=\"ARDUINO_R3\">\n<wire x1=\"-10.16\" y1=\"-35.56\" x2=\"-10.16\" y2=\"25.4\" width=\"0.4064\" layer=\"94\"/>\n<wire x1=\"-10.16\" y1=\"25.4\" x2=\"10.16\" y2=\"25.4\" width=\"0.4064\" layer=\"94\"/>\n<wire x1=\"10.16\" y1=\"25.4\" x2=\"10.16\" y2=\"-35.56\" width=\"0.4064\" layer=\"94\"/>\n<wire x1=\"10.16\" y1=\"-35.56\" x2=\"-10.16\" y2=\"-35.56\" width=\"0.4064\" layer=\"94\"/>\n<text x=\"-9.652\" y=\"26.162\" size=\"1.778\" layer=\"95\">&gt;Name</text>\n<text x=\"-10.16\" y=\"-35.814\" size=\"1.778\" layer=\"96\" align=\"top-left\">101</text>\n<pin name=\"D0\" x=\"12.7\" y=\"22.86\" visible=\"pin\" length=\"short\" rot=\"R180\"/>\n<pin name=\"D1\" x=\"12.7\" y=\"20.32\" visible=\"pin\" length=\"short\" rot=\"R180\"/>\n<pin name=\"D2\" x=\"12.7\" y=\"17.78\" visible=\"pin\" length=\"short\" rot=\"R180\"/>\n<pin name=\"*D3\" x=\"12.7\" y=\"15.24\" visible=\"pin\" length=\"short\" rot=\"R180\"/>\n<pin name=\"D4\" x=\"12.7\" y=\"12.7\" visible=\"pin\" length=\"short\" rot=\"R180\"/>\n<pin name=\"*D5\" x=\"12.7\" y=\"10.16\" visible=\"pin\" length=\"short\" rot=\"R180\"/>\n<pin name=\"*D6\" x=\"12.7\" y=\"7.62\" visible=\"pin\" length=\"short\" rot=\"R180\"/>\n<pin name=\"D7\" x=\"12.7\" y=\"5.08\" visible=\"pin\" length=\"short\" rot=\"R180\"/>\n<pin name=\"D8\" x=\"12.7\" y=\"2.54\" visible=\"pin\" length=\"short\" rot=\"R180\"/>\n<pin name=\"*D9\" x=\"12.7\" y=\"0\" visible=\"pin\" length=\"short\" rot=\"R180\"/>\n<pin name=\"*D10\" x=\"12.7\" y=\"-2.54\" visible=\"pin\" length=\"short\" rot=\"R180\"/>\n<pin name=\"*D11\" x=\"12.7\" y=\"-5.08\" visible=\"pin\" length=\"short\" rot=\"R180\"/>\n<pin name=\"D12\" x=\"12.7\" y=\"-7.62\" visible=\"pin\" length=\"short\" rot=\"R180\"/>\n<pin name=\"D13\" x=\"12.7\" y=\"-10.16\" visible=\"pin\" length=\"short\" rot=\"R180\"/>\n<pin name=\"A0\" x=\"-12.7\" y=\"22.86\" visible=\"pin\" length=\"short\"/>\n<pin name=\"A1\" x=\"-12.7\" y=\"20.32\" visible=\"pin\" length=\"short\"/>\n<pin name=\"A2\" x=\"-12.7\" y=\"17.78\" visible=\"pin\" length=\"short\"/>\n<pin name=\"A3\" x=\"-12.7\" y=\"15.24\" visible=\"pin\" length=\"short\"/>\n<pin name=\"A4\" x=\"-12.7\" y=\"12.7\" visible=\"pin\" length=\"short\"/>\n<pin name=\"A5\" x=\"-12.7\" y=\"10.16\" visible=\"pin\" length=\"short\"/>\n<pin name=\"VIN\" x=\"-12.7\" y=\"0\" visible=\"pin\" length=\"short\"/>\n<pin name=\"!RESET!@1\" x=\"-12.7\" y=\"2.54\" visible=\"pin\" length=\"short\"/>\n<pin name=\"5V\" x=\"-12.7\" y=\"-2.54\" visible=\"pin\" length=\"short\"/>\n<pin name=\"AREF\" x=\"-12.7\" y=\"-7.62\" visible=\"pin\" length=\"short\"/>\n<pin name=\"GND@2\" x=\"-12.7\" y=\"-10.16\" visible=\"pin\" length=\"short\"/>\n<pin name=\"GND@1\" x=\"-12.7\" y=\"-12.7\" visible=\"pin\" length=\"short\"/>\n<pin name=\"GND@0\" x=\"-12.7\" y=\"-15.24\" visible=\"pin\" length=\"short\"/>\n<pin name=\"3.3V\" x=\"-12.7\" y=\"-5.08\" visible=\"pin\" length=\"short\"/>\n<pin name=\"IOREF\" x=\"-12.7\" y=\"5.08\" visible=\"pin\" length=\"short\"/>\n<pin name=\"SDA\" x=\"12.7\" y=\"-12.7\" visible=\"pin\" length=\"short\" rot=\"R180\"/>\n<pin name=\"SCL\" x=\"12.7\" y=\"-15.24\" visible=\"pin\" length=\"short\" rot=\"R180\"/>\n<pin name=\"VCC\" x=\"12.7\" y=\"-20.32\" visible=\"pin\" length=\"short\" rot=\"R180\"/>\n<pin name=\"MISO\" x=\"12.7\" y=\"-22.86\" visible=\"pin\" length=\"short\" rot=\"R180\"/>\n<pin name=\"MOSI\" x=\"12.7\" y=\"-25.4\" visible=\"pin\" length=\"short\" rot=\"R180\"/>\n<pin name=\"SCK\" x=\"12.7\" y=\"-27.94\" visible=\"pin\" length=\"short\" rot=\"R180\"/>\n<pin name=\"!RESET!@2\" x=\"12.7\" y=\"-30.48\" visible=\"pin\" length=\"short\" rot=\"R180\"/>\n<pin name=\"GND\" x=\"12.7\" y=\"-33.02\" visible=\"pin\" length=\"short\" rot=\"R180\"/>\n</symbol>\n</symbols>\n<devicesets>\n<deviceset name=\"ARDUINO_R3\" prefix=\"J\">\n<description>&lt;h3&gt;Arduino R3 Footprint (w/ SPI header)&lt;/h3&gt;</description>\n<gates>\n<gate name=\"G$1\" symbol=\"ARDUINO_R3\" x=\"0\" y=\"0\"/>\n</gates>\n<devices>\n<device name=\"\" package=\"ARDUINO_R3\">\n<connects>\n<connect gate=\"G$1\" pin=\"!RESET!@1\" pad=\"RESET@1\"/>\n<connect gate=\"G$1\" pin=\"!RESET!@2\" pad=\"RESET@2\"/>\n<connect gate=\"G$1\" pin=\"*D10\" pad=\"D10\"/>\n<connect gate=\"G$1\" pin=\"*D11\" pad=\"D11\"/>\n<connect gate=\"G$1\" pin=\"*D3\" pad=\"D3\"/>\n<connect gate=\"G$1\" pin=\"*D5\" pad=\"D5\"/>\n<connect gate=\"G$1\" pin=\"*D6\" pad=\"D6\"/>\n<connect gate=\"G$1\" pin=\"*D9\" pad=\"D9\"/>\n<connect gate=\"G$1\" pin=\"3.3V\" pad=\"3.3V\"/>\n<connect gate=\"G$1\" pin=\"5V\" pad=\"5V\"/>\n<connect gate=\"G$1\" pin=\"A0\" pad=\"A0\"/>\n<connect gate=\"G$1\" pin=\"A1\" pad=\"A1\"/>\n<connect gate=\"G$1\" pin=\"A2\" pad=\"A2\"/>\n<connect gate=\"G$1\" pin=\"A3\" pad=\"A3\"/>\n<connect gate=\"G$1\" pin=\"A4\" pad=\"A4\"/>\n<connect gate=\"G$1\" pin=\"A5\" pad=\"A5\"/>\n<connect gate=\"G$1\" pin=\"AREF\" pad=\"AREF\"/>\n<connect gate=\"G$1\" pin=\"D0\" pad=\"D0\"/>\n<connect gate=\"G$1\" pin=\"D1\" pad=\"D1\"/>\n<connect gate=\"G$1\" pin=\"D12\" pad=\"D12\"/>\n<connect gate=\"G$1\" pin=\"D13\" pad=\"D13\"/>\n<connect gate=\"G$1\" pin=\"D2\" pad=\"D2\"/>\n<connect gate=\"G$1\" pin=\"D4\" pad=\"D4\"/>\n<connect gate=\"G$1\" pin=\"D7\" pad=\"D7\"/>\n<connect gate=\"G$1\" pin=\"D8\" pad=\"D8\"/>\n<connect gate=\"G$1\" pin=\"GND\" pad=\"GND@1\"/>\n<connect gate=\"G$1\" pin=\"GND@0\" pad=\"GND@2\"/>\n<connect gate=\"G$1\" pin=\"GND@1\" pad=\"GND@3\"/>\n<connect gate=\"G$1\" pin=\"GND@2\" pad=\"GND@4\"/>\n<connect gate=\"G$1\" pin=\"IOREF\" pad=\"IOREF\"/>\n<connect gate=\"G$1\" pin=\"MISO\" pad=\"MISO\"/>\n<connect gate=\"G$1\" pin=\"MOSI\" pad=\"MOSI\"/>\n<connect gate=\"G$1\" pin=\"SCK\" pad=\"SCK\"/>\n<connect gate=\"G$1\" pin=\"SCL\" pad=\"SCL\"/>\n<connect gate=\"G$1\" pin=\"SDA\" pad=\"SDA\"/>\n<connect gate=\"G$1\" pin=\"VCC\" pad=\"VCC\"/>\n<connect gate=\"G$1\" pin=\"VIN\" pad=\"VIN\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n<device name=\"NO_HOLES\" package=\"ARDUINO_R3_NO_HOLES\">\n<connects>\n<connect gate=\"G$1\" pin=\"!RESET!@1\" pad=\"RESET@1\"/>\n<connect gate=\"G$1\" pin=\"!RESET!@2\" pad=\"RESET@2\"/>\n<connect gate=\"G$1\" pin=\"*D10\" pad=\"D10\"/>\n<connect gate=\"G$1\" pin=\"*D11\" pad=\"D11\"/>\n<connect gate=\"G$1\" pin=\"*D3\" pad=\"D3\"/>\n<connect gate=\"G$1\" pin=\"*D5\" pad=\"D5\"/>\n<connect gate=\"G$1\" pin=\"*D6\" pad=\"D6\"/>\n<connect gate=\"G$1\" pin=\"*D9\" pad=\"D9\"/>\n<connect gate=\"G$1\" pin=\"3.3V\" pad=\"3.3V\"/>\n<connect gate=\"G$1\" pin=\"5V\" pad=\"5V\"/>\n<connect gate=\"G$1\" pin=\"A0\" pad=\"A0\"/>\n<connect gate=\"G$1\" pin=\"A1\" pad=\"A1\"/>\n<connect gate=\"G$1\" pin=\"A2\" pad=\"A2\"/>\n<connect gate=\"G$1\" pin=\"A3\" pad=\"A3\"/>\n<connect gate=\"G$1\" pin=\"A4\" pad=\"A4\"/>\n<connect gate=\"G$1\" pin=\"A5\" pad=\"A5\"/>\n<connect gate=\"G$1\" pin=\"AREF\" pad=\"AREF\"/>\n<connect gate=\"G$1\" pin=\"D0\" pad=\"D0\"/>\n<connect gate=\"G$1\" pin=\"D1\" pad=\"D1\"/>\n<connect gate=\"G$1\" pin=\"D12\" pad=\"D12\"/>\n<connect gate=\"G$1\" pin=\"D13\" pad=\"D13\"/>\n<connect gate=\"G$1\" pin=\"D2\" pad=\"D2\"/>\n<connect gate=\"G$1\" pin=\"D4\" pad=\"D4\"/>\n<connect gate=\"G$1\" pin=\"D7\" pad=\"D7\"/>\n<connect gate=\"G$1\" pin=\"D8\" pad=\"D8\"/>\n<connect gate=\"G$1\" pin=\"GND\" pad=\"GND@1\"/>\n<connect gate=\"G$1\" pin=\"GND@0\" pad=\"GND@2\"/>\n<connect gate=\"G$1\" pin=\"GND@1\" pad=\"GND@3\"/>\n<connect gate=\"G$1\" pin=\"GND@2\" pad=\"GND@4\"/>\n<connect gate=\"G$1\" pin=\"IOREF\" pad=\"IOREF\"/>\n<connect gate=\"G$1\" pin=\"MISO\" pad=\"MISO\"/>\n<connect gate=\"G$1\" pin=\"MOSI\" pad=\"MOSI\"/>\n<connect gate=\"G$1\" pin=\"SCK\" pad=\"SCK\"/>\n<connect gate=\"G$1\" pin=\"SCL\" pad=\"SCL\"/>\n<connect gate=\"G$1\" pin=\"SDA\" pad=\"SDA\"/>\n<connect gate=\"G$1\" pin=\"VCC\" pad=\"VCC\"/>\n<connect gate=\"G$1\" pin=\"VIN\" pad=\"VIN\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n</devices>\n</deviceset>\n</devicesets>\n</library>\n</libraries>\n<attributes>\n</attributes>\n<variantdefs>\n</variantdefs>\n<classes>\n<class number=\"0\" name=\"default\" width=\"0\" drill=\"0\">\n</class>\n</classes>\n<parts>\n<part name=\"BAT\" library=\"battery\" deviceset=\"CRAA\" device=\"\" value=\"4xAA\"/>\n<part name=\"1B-\" library=\"SparkFun-Electromechanical\" deviceset=\"SWITCH-SPDT\" device=\"PTH_LOCK\" value=\"1B\"/>\n<part name=\"1A\" library=\"SparkFun-Electromechanical\" deviceset=\"SWITCH-SPDT\" device=\"PTH_LOCK\" value=\"1A\"/>\n<part name=\"2B\" library=\"SparkFun-Electromechanical\" deviceset=\"SWITCH-SPDT\" device=\"PTH_LOCK\" value=\"2B\"/>\n<part name=\"2A\" library=\"SparkFun-Electromechanical\" deviceset=\"SWITCH-SPDT\" device=\"PTH_LOCK\" value=\"2A\"/>\n<part name=\"+6V\" library=\"supply1\" deviceset=\"+12V\" device=\"\" value=\"6V\"/>\n<part name=\"MOTOR\" library=\"SparkFun-Electromechanical\" deviceset=\"MOTOR\" device=\"10MM\"/>\n<part name=\"HBRIDGE\" library=\"SparkFun-PowerIC\" deviceset=\"TB6612FNG\" device=\"\" value=\"TB6612FNG\"/>\n<part name=\"DOOR\" library=\"switch-coto\" deviceset=\"CT10-XXXX-\" device=\"A2\"/>\n<part name=\"BUZZER\" library=\"SparkFun-Electromechanical\" deviceset=\"BUZZER\" device=\"PTH\"/>\n<part name=\"R1\" library=\"SparkFun-Resistors\" deviceset=\"680OHM1/10W5%(0603)\" device=\"\" value=\"680\"/>\n<part name=\"GND9\" library=\"supply1\" deviceset=\"GND\" device=\"\"/>\n<part name=\"GND1\" library=\"supply1\" deviceset=\"GND\" device=\"\"/>\n<part name=\"ARDUINO\" library=\"SparkFun-Boards\" deviceset=\"ARDUINO_R3\" device=\"\"/>\n</parts>\n<sheets>\n<sheet>\n<plain>\n<circle x=\"78.74\" y=\"184.15\" radius=\"3.048\" width=\"0.762\" layer=\"104\"/>\n<circle x=\"78.74\" y=\"209.55\" radius=\"3.048\" width=\"0.762\" layer=\"255\"/>\n<text x=\"96.266\" y=\"175.26\" size=\"1.778\" layer=\"97\" rot=\"R90\">ORANGE RING</text>\n<text x=\"94.488\" y=\"217.17\" size=\"1.778\" layer=\"97\" rot=\"R270\">BLACK RING</text>\n<text x=\"53.34\" y=\"200.914\" size=\"1.27\" layer=\"98\">BLUE</text>\n<text x=\"53.34\" y=\"198.374\" size=\"1.27\" layer=\"98\">GREEN</text>\n<text x=\"53.34\" y=\"195.834\" size=\"1.27\" layer=\"98\">YELLOW</text>\n<text x=\"53.34\" y=\"193.294\" size=\"1.27\" layer=\"98\">ORANGE</text>\n<text x=\"88.646\" y=\"238.76\" size=\"1.27\" layer=\"98\" rot=\"R90\">BROWN</text>\n<text x=\"91.186\" y=\"238.76\" size=\"1.27\" layer=\"98\" rot=\"R90\">RED</text>\n<text x=\"53.34\" y=\"152.654\" size=\"1.27\" layer=\"98\">GREY</text>\n<text x=\"53.34\" y=\"155.194\" size=\"1.27\" layer=\"98\">WHITE</text>\n<text x=\"53.34\" y=\"157.734\" size=\"1.27\" layer=\"98\">BLACK</text>\n<text x=\"19.05\" y=\"152.654\" size=\"1.27\" layer=\"98\">RED</text>\n<text x=\"19.05\" y=\"150.114\" size=\"1.27\" layer=\"98\">BLACK</text>\n<text x=\"38.1\" y=\"134.874\" size=\"1.27\" layer=\"98\">BLACK</text>\n<text x=\"38.1\" y=\"132.334\" size=\"1.27\" layer=\"98\">RED</text>\n<wire x1=\"48.26\" y1=\"220.98\" x2=\"38.1\" y2=\"220.98\" width=\"0.1524\" layer=\"93\" style=\"longdash\"/>\n<wire x1=\"-2.54\" y1=\"220.98\" x2=\"12.7\" y2=\"220.98\" width=\"0.4064\" layer=\"94\" style=\"longdash\"/>\n<wire x1=\"12.7\" y1=\"220.98\" x2=\"12.7\" y2=\"246.38\" width=\"0.4064\" layer=\"94\" style=\"longdash\"/>\n<wire x1=\"12.7\" y1=\"246.38\" x2=\"-2.54\" y2=\"246.38\" width=\"0.4064\" layer=\"94\" style=\"longdash\"/>\n<wire x1=\"-2.54\" y1=\"246.38\" x2=\"-2.54\" y2=\"220.98\" width=\"0.4064\" layer=\"94\" style=\"longdash\"/>\n<text x=\"-0.508\" y=\"247.142\" size=\"1.778\" layer=\"95\">BATTERY</text>\n<wire x1=\"73.66\" y1=\"198.12\" x2=\"93.98\" y2=\"198.12\" width=\"0.4064\" layer=\"94\" style=\"longdash\"/>\n<wire x1=\"93.98\" y1=\"198.12\" x2=\"93.98\" y2=\"220.98\" width=\"0.4064\" layer=\"94\" style=\"longdash\"/>\n<wire x1=\"93.98\" y1=\"220.98\" x2=\"73.66\" y2=\"220.98\" width=\"0.4064\" layer=\"94\" style=\"longdash\"/>\n<wire x1=\"73.66\" y1=\"220.98\" x2=\"73.66\" y2=\"198.12\" width=\"0.4064\" layer=\"94\" style=\"longdash\"/>\n<wire x1=\"73.66\" y1=\"195.58\" x2=\"93.98\" y2=\"195.58\" width=\"0.4064\" layer=\"94\" style=\"longdash\"/>\n<wire x1=\"93.98\" y1=\"195.58\" x2=\"93.98\" y2=\"172.72\" width=\"0.4064\" layer=\"94\" style=\"longdash\"/>\n<wire x1=\"93.98\" y1=\"172.72\" x2=\"73.66\" y2=\"172.72\" width=\"0.4064\" layer=\"94\" style=\"longdash\"/>\n<wire x1=\"73.66\" y1=\"172.72\" x2=\"73.66\" y2=\"195.58\" width=\"0.4064\" layer=\"94\" style=\"longdash\"/>\n<text x=\"53.34\" y=\"150.114\" size=\"1.27\" layer=\"98\">WHITE</text>\n<text x=\"53.34\" y=\"147.574\" size=\"1.27\" layer=\"98\">GREY</text>\n<text x=\"53.34\" y=\"190.754\" size=\"1.27\" layer=\"98\">GREY</text>\n<text x=\"98.806\" y=\"238.76\" size=\"1.27\" layer=\"98\" rot=\"R90\">WHITE</text>\n<text x=\"101.346\" y=\"238.76\" size=\"1.27\" layer=\"98\" rot=\"R90\">GREY</text>\n<text x=\"53.34\" y=\"185.674\" size=\"1.27\" layer=\"98\">BLACK</text>\n<text x=\"53.34\" y=\"188.214\" size=\"1.27\" layer=\"98\">WHITE</text>\n<text x=\"2.286\" y=\"213.36\" size=\"1.27\" layer=\"98\" rot=\"R90\">BLACK</text>\n<text x=\"-0.254\" y=\"213.36\" size=\"1.27\" layer=\"98\" rot=\"R90\">RED</text>\n</plain>\n<instances>\n<instance part=\"BAT\" gate=\"G$1\" x=\"7.62\" y=\"233.68\" smashed=\"yes\" rot=\"R90\">\n<attribute name=\"VALUE\" x=\"4.064\" y=\"230.632\" size=\"1.778\" layer=\"96\" rot=\"R90\"/>\n</instance>\n<instance part=\"1B-\" gate=\"1\" x=\"81.28\" y=\"190.5\" smashed=\"yes\">\n<attribute name=\"VALUE\" x=\"83.82\" y=\"189.23\" size=\"1.778\" layer=\"96\"/>\n</instance>\n<instance part=\"1A\" gate=\"1\" x=\"81.28\" y=\"177.8\" smashed=\"yes\">\n<attribute name=\"VALUE\" x=\"83.82\" y=\"176.53\" size=\"1.778\" layer=\"96\"/>\n</instance>\n<instance part=\"2B\" gate=\"1\" x=\"81.28\" y=\"215.9\" smashed=\"yes\">\n<attribute name=\"VALUE\" x=\"83.82\" y=\"214.63\" size=\"1.778\" layer=\"96\"/>\n</instance>\n<instance part=\"2A\" gate=\"1\" x=\"81.28\" y=\"203.2\" smashed=\"yes\">\n<attribute name=\"VALUE\" x=\"83.82\" y=\"201.93\" size=\"1.778\" layer=\"96\"/>\n</instance>\n<instance part=\"+6V\" gate=\"1\" x=\"7.62\" y=\"243.84\" smashed=\"yes\">\n<attribute name=\"VALUE\" x=\"3.048\" y=\"241.808\" size=\"1.778\" layer=\"96\"/>\n</instance>\n<instance part=\"MOTOR\" gate=\"G$1\" x=\"10.16\" y=\"152.4\" smashed=\"yes\" rot=\"R270\">\n<attribute name=\"NAME\" x=\"6.35\" y=\"154.94\" size=\"1.778\" layer=\"95\"/>\n</instance>\n<instance part=\"HBRIDGE\" gate=\"G$1\" x=\"40.64\" y=\"157.48\"/>\n<instance part=\"DOOR\" gate=\"G$1\" x=\"17.78\" y=\"182.88\" smashed=\"yes\">\n<attribute name=\"NAME\" x=\"15.24\" y=\"180.34\" size=\"1.778\" layer=\"95\"/>\n</instance>\n<instance part=\"BUZZER\" gate=\"G$1\" x=\"10.16\" y=\"187.96\" smashed=\"yes\">\n<attribute name=\"NAME\" x=\"7.62\" y=\"193.04\" size=\"1.778\" layer=\"95\"/>\n</instance>\n<instance part=\"R1\" gate=\"G$1\" x=\"17.78\" y=\"185.42\" smashed=\"yes\">\n<attribute name=\"VALUE\" x=\"16.51\" y=\"187.198\" size=\"1.778\" layer=\"96\"/>\n</instance>\n<instance part=\"GND9\" gate=\"1\" x=\"10.16\" y=\"180.34\"/>\n<instance part=\"GND1\" gate=\"1\" x=\"7.62\" y=\"226.06\" smashed=\"yes\">\n<attribute name=\"VALUE\" x=\"5.08\" y=\"223.774\" size=\"1.778\" layer=\"96\"/>\n</instance>\n<instance part=\"ARDUINO\" gate=\"G$1\" x=\"40.64\" y=\"205.74\" rot=\"MR180\"/>\n</instances>\n<busses>\n</busses>\n<nets>\n<net name=\"BLACK_GND\" class=\"0\">\n<segment>\n<pinref part=\"DOOR\" gate=\"G$1\" pin=\"1\"/>\n<pinref part=\"GND9\" gate=\"1\" pin=\"GND\"/>\n<wire x1=\"12.7\" y1=\"182.88\" x2=\"10.16\" y2=\"182.88\" width=\"0.1524\" layer=\"91\"/>\n<pinref part=\"BUZZER\" gate=\"G$1\" pin=\"1\"/>\n<wire x1=\"10.16\" y1=\"185.42\" x2=\"10.16\" y2=\"182.88\" width=\"0.1524\" layer=\"91\"/>\n<junction x=\"10.16\" y=\"182.88\"/>\n</segment>\n</net>\n<net name=\"2A\" class=\"0\">\n<segment>\n<pinref part=\"2A\" gate=\"1\" pin=\"P\"/>\n<wire x1=\"78.74\" y1=\"203.2\" x2=\"71.12\" y2=\"203.2\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"71.12\" y1=\"203.2\" x2=\"71.12\" y2=\"198.12\" width=\"0.1524\" layer=\"91\"/>\n<pinref part=\"ARDUINO\" gate=\"G$1\" pin=\"*D6\"/>\n<wire x1=\"71.12\" y1=\"198.12\" x2=\"53.34\" y2=\"198.12\" width=\"0.1524\" layer=\"91\"/>\n</segment>\n</net>\n<net name=\"1A\" class=\"0\">\n<segment>\n<pinref part=\"1A\" gate=\"1\" pin=\"P\"/>\n<wire x1=\"78.74\" y1=\"177.8\" x2=\"68.58\" y2=\"177.8\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"68.58\" y1=\"177.8\" x2=\"68.58\" y2=\"193.04\" width=\"0.1524\" layer=\"91\"/>\n<pinref part=\"ARDUINO\" gate=\"G$1\" pin=\"D4\"/>\n<wire x1=\"68.58\" y1=\"193.04\" x2=\"53.34\" y2=\"193.04\" width=\"0.1524\" layer=\"91\"/>\n</segment>\n</net>\n<net name=\"BLACK_OUT\" class=\"0\">\n<segment>\n<pinref part=\"MOTOR\" gate=\"G$1\" pin=\"-\"/>\n<wire x1=\"5.08\" y1=\"152.4\" x2=\"5.08\" y2=\"149.86\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"5.08\" y1=\"149.86\" x2=\"25.4\" y2=\"149.86\" width=\"0.1524\" layer=\"91\"/>\n<pinref part=\"HBRIDGE\" gate=\"G$1\" pin=\"MB1\"/>\n</segment>\n</net>\n<net name=\"MB2\" class=\"0\">\n<segment>\n<pinref part=\"MOTOR\" gate=\"G$1\" pin=\"+\"/>\n<pinref part=\"HBRIDGE\" gate=\"G$1\" pin=\"MB2\"/>\n<wire x1=\"15.24\" y1=\"152.4\" x2=\"25.4\" y2=\"152.4\" width=\"0.1524\" layer=\"91\"/>\n</segment>\n</net>\n<net name=\"PWMB\" class=\"0\">\n<segment>\n<pinref part=\"HBRIDGE\" gate=\"G$1\" pin=\"PWMB\"/>\n<wire x1=\"53.34\" y1=\"152.4\" x2=\"66.04\" y2=\"152.4\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"66.04\" y1=\"152.4\" x2=\"66.04\" y2=\"190.5\" width=\"0.1524\" layer=\"91\"/>\n<pinref part=\"ARDUINO\" gate=\"G$1\" pin=\"*D3\"/>\n<wire x1=\"66.04\" y1=\"190.5\" x2=\"53.34\" y2=\"190.5\" width=\"0.1524\" layer=\"91\"/>\n</segment>\n</net>\n<net name=\"BIN2\" class=\"0\">\n<segment>\n<pinref part=\"HBRIDGE\" gate=\"G$1\" pin=\"BIN2\"/>\n<wire x1=\"63.5\" y1=\"154.94\" x2=\"53.34\" y2=\"154.94\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"63.5\" y1=\"154.94\" x2=\"63.5\" y2=\"187.96\" width=\"0.1524\" layer=\"91\"/>\n<pinref part=\"ARDUINO\" gate=\"G$1\" pin=\"D2\"/>\n<wire x1=\"63.5\" y1=\"187.96\" x2=\"53.34\" y2=\"187.96\" width=\"0.1524\" layer=\"91\"/>\n</segment>\n</net>\n<net name=\"BIN1\" class=\"0\">\n<segment>\n<pinref part=\"HBRIDGE\" gate=\"G$1\" pin=\"BIN1\"/>\n<wire x1=\"53.34\" y1=\"157.48\" x2=\"60.96\" y2=\"157.48\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"60.96\" y1=\"157.48\" x2=\"60.96\" y2=\"185.42\" width=\"0.1524\" layer=\"91\"/>\n<pinref part=\"ARDUINO\" gate=\"G$1\" pin=\"D1\"/>\n<wire x1=\"60.96\" y1=\"185.42\" x2=\"53.34\" y2=\"185.42\" width=\"0.1524\" layer=\"91\"/>\n</segment>\n</net>\n<net name=\"2B\" class=\"0\">\n<segment>\n<pinref part=\"2B\" gate=\"1\" pin=\"P\"/>\n<wire x1=\"78.74\" y1=\"215.9\" x2=\"68.58\" y2=\"215.9\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"68.58\" y1=\"215.9\" x2=\"68.58\" y2=\"200.66\" width=\"0.1524\" layer=\"91\"/>\n<pinref part=\"ARDUINO\" gate=\"G$1\" pin=\"D7\"/>\n<wire x1=\"53.34\" y1=\"200.66\" x2=\"68.58\" y2=\"200.66\" width=\"0.1524\" layer=\"91\"/>\n</segment>\n</net>\n<net name=\"1B\" class=\"0\">\n<segment>\n<pinref part=\"1B-\" gate=\"1\" pin=\"P\"/>\n<wire x1=\"78.74\" y1=\"190.5\" x2=\"71.12\" y2=\"190.5\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"71.12\" y1=\"190.5\" x2=\"71.12\" y2=\"195.58\" width=\"0.1524\" layer=\"91\"/>\n<pinref part=\"ARDUINO\" gate=\"G$1\" pin=\"*D5\"/>\n<wire x1=\"71.12\" y1=\"195.58\" x2=\"53.34\" y2=\"195.58\" width=\"0.1524\" layer=\"91\"/>\n</segment>\n</net>\n<net name=\"N$4\" class=\"0\">\n<segment>\n<pinref part=\"R1\" gate=\"G$1\" pin=\"1\"/>\n<pinref part=\"BUZZER\" gate=\"G$1\" pin=\"2\"/>\n</segment>\n</net>\n<net name=\"+6V\" class=\"0\">\n<segment>\n<wire x1=\"0\" y1=\"132.08\" x2=\"0\" y2=\"238.76\" width=\"0.1524\" layer=\"91\"/>\n<pinref part=\"BAT\" gate=\"G$1\" pin=\"+\"/>\n<wire x1=\"0\" y1=\"238.76\" x2=\"7.62\" y2=\"238.76\" width=\"0.1524\" layer=\"91\"/>\n<junction x=\"7.62\" y=\"238.76\"/>\n<pinref part=\"+6V\" gate=\"1\" pin=\"+12V\"/>\n<wire x1=\"7.62\" y1=\"241.3\" x2=\"7.62\" y2=\"238.76\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"0\" y1=\"132.08\" x2=\"48.26\" y2=\"132.08\" width=\"0.1524\" layer=\"91\"/>\n<pinref part=\"HBRIDGE\" gate=\"G$1\" pin=\"VM+\"/>\n<wire x1=\"48.26\" y1=\"132.08\" x2=\"48.26\" y2=\"137.16\" width=\"0.1524\" layer=\"91\"/>\n</segment>\n</net>\n<net name=\"GND\" class=\"0\">\n<segment>\n<pinref part=\"HBRIDGE\" gate=\"G$1\" pin=\"VM-\"/>\n<wire x1=\"45.72\" y1=\"137.16\" x2=\"45.72\" y2=\"134.62\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"45.72\" y1=\"134.62\" x2=\"2.54\" y2=\"134.62\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"2.54\" y1=\"134.62\" x2=\"2.54\" y2=\"228.6\" width=\"0.1524\" layer=\"91\"/>\n<pinref part=\"BAT\" gate=\"G$1\" pin=\"-\"/>\n<wire x1=\"2.54\" y1=\"228.6\" x2=\"7.62\" y2=\"228.6\" width=\"0.1524\" layer=\"91\"/>\n<pinref part=\"GND1\" gate=\"1\" pin=\"GND\"/>\n<junction x=\"7.62\" y=\"228.6\"/>\n<pinref part=\"HBRIDGE\" gate=\"G$1\" pin=\"GND\"/>\n<wire x1=\"53.34\" y1=\"149.86\" x2=\"99.06\" y2=\"149.86\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"53.34\" y1=\"149.86\" x2=\"45.72\" y2=\"149.86\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"45.72\" y1=\"149.86\" x2=\"45.72\" y2=\"137.16\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"99.06\" y1=\"149.86\" x2=\"99.06\" y2=\"246.38\" width=\"0.1524\" layer=\"91\"/>\n<pinref part=\"1A\" gate=\"1\" pin=\"S\"/>\n<pinref part=\"ARDUINO\" gate=\"G$1\" pin=\"GND@2\"/>\n<wire x1=\"25.4\" y1=\"215.9\" x2=\"27.94\" y2=\"215.9\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"25.4\" y1=\"215.9\" x2=\"25.4\" y2=\"246.38\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"25.4\" y1=\"246.38\" x2=\"88.9\" y2=\"246.38\" width=\"0.1524\" layer=\"91\"/>\n<pinref part=\"2B\" gate=\"1\" pin=\"S\"/>\n<wire x1=\"88.9\" y1=\"213.36\" x2=\"86.36\" y2=\"213.36\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"88.9\" y1=\"213.36\" x2=\"88.9\" y2=\"246.38\" width=\"0.1524\" layer=\"91\"/>\n<junction x=\"88.9\" y=\"213.36\"/>\n<pinref part=\"2A\" gate=\"1\" pin=\"S\"/>\n<wire x1=\"88.9\" y1=\"200.66\" x2=\"86.36\" y2=\"200.66\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"88.9\" y1=\"200.66\" x2=\"88.9\" y2=\"213.36\" width=\"0.1524\" layer=\"91\"/>\n<junction x=\"88.9\" y=\"200.66\"/>\n<pinref part=\"1B-\" gate=\"1\" pin=\"S\"/>\n<wire x1=\"88.9\" y1=\"187.96\" x2=\"86.36\" y2=\"187.96\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"88.9\" y1=\"187.96\" x2=\"88.9\" y2=\"200.66\" width=\"0.1524\" layer=\"91\"/>\n<junction x=\"88.9\" y=\"187.96\"/>\n<wire x1=\"88.9\" y1=\"175.26\" x2=\"88.9\" y2=\"187.96\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"88.9\" y1=\"175.26\" x2=\"86.36\" y2=\"175.26\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"88.9\" y1=\"246.38\" x2=\"99.06\" y2=\"246.38\" width=\"0.1524\" layer=\"91\"/>\n<junction x=\"88.9\" y=\"246.38\"/>\n</segment>\n</net>\n<net name=\"N$2\" class=\"0\">\n<segment>\n<pinref part=\"ARDUINO\" gate=\"G$1\" pin=\"A1\"/>\n<pinref part=\"R1\" gate=\"G$1\" pin=\"2\"/>\n<wire x1=\"27.94\" y1=\"185.42\" x2=\"22.86\" y2=\"185.42\" width=\"0.1524\" layer=\"91\"/>\n</segment>\n</net>\n<net name=\"N$3\" class=\"0\">\n<segment>\n<pinref part=\"ARDUINO\" gate=\"G$1\" pin=\"A0\"/>\n<pinref part=\"DOOR\" gate=\"G$1\" pin=\"2\"/>\n<wire x1=\"27.94\" y1=\"182.88\" x2=\"22.86\" y2=\"182.88\" width=\"0.1524\" layer=\"91\"/>\n</segment>\n</net>\n<net name=\"N$5\" class=\"0\">\n<segment>\n<pinref part=\"HBRIDGE\" gate=\"G$1\" pin=\"VCC\"/>\n<wire x1=\"53.34\" y1=\"147.32\" x2=\"101.6\" y2=\"147.32\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"101.6\" y1=\"248.92\" x2=\"101.6\" y2=\"147.32\" width=\"0.1524\" layer=\"91\"/>\n<pinref part=\"1A\" gate=\"1\" pin=\"O\"/>\n<pinref part=\"2B\" gate=\"1\" pin=\"O\"/>\n<wire x1=\"91.44\" y1=\"218.44\" x2=\"86.36\" y2=\"218.44\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"91.44\" y1=\"218.44\" x2=\"91.44\" y2=\"248.92\" width=\"0.1524\" layer=\"91\"/>\n<junction x=\"91.44\" y=\"218.44\"/>\n<pinref part=\"2A\" gate=\"1\" pin=\"O\"/>\n<wire x1=\"91.44\" y1=\"205.74\" x2=\"86.36\" y2=\"205.74\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"91.44\" y1=\"205.74\" x2=\"91.44\" y2=\"218.44\" width=\"0.1524\" layer=\"91\"/>\n<junction x=\"91.44\" y=\"205.74\"/>\n<pinref part=\"1B-\" gate=\"1\" pin=\"O\"/>\n<wire x1=\"91.44\" y1=\"193.04\" x2=\"86.36\" y2=\"193.04\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"91.44\" y1=\"193.04\" x2=\"91.44\" y2=\"205.74\" width=\"0.1524\" layer=\"91\"/>\n<junction x=\"91.44\" y=\"193.04\"/>\n<wire x1=\"91.44\" y1=\"180.34\" x2=\"91.44\" y2=\"193.04\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"91.44\" y1=\"180.34\" x2=\"86.36\" y2=\"180.34\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"22.86\" y1=\"248.92\" x2=\"91.44\" y2=\"248.92\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"101.6\" y1=\"248.92\" x2=\"91.44\" y2=\"248.92\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"22.86\" y1=\"248.92\" x2=\"22.86\" y2=\"210.82\" width=\"0.1524\" layer=\"91\"/>\n<pinref part=\"ARDUINO\" gate=\"G$1\" pin=\"3.3V\"/>\n<wire x1=\"22.86\" y1=\"210.82\" x2=\"27.94\" y2=\"210.82\" width=\"0.1524\" layer=\"91\"/>\n<junction x=\"91.44\" y=\"248.92\"/>\n</segment>\n</net>\n</nets>\n</sheet>\n</sheets>\n</schematic>\n</drawing>\n</eagle>\n"
  },
  {
    "path": "examples/lock/arduino101/dummy/dummy.ino",
    "content": "#include <Arduino.h>\n#include <CurieBLE.h>\n\nconst int pinStateLED = 13;\n\nBLEPeripheral ble;\nBLEService informationService(\"180A\");\nBLECharacteristic modelCharacteristic(\"2A24\", BLERead, \"101\");\nBLECharacteristic manufacturerCharacteristic(\"2A29\", BLERead, \"Arduino\");\nBLECharacteristic serialNumberCharacteristic(\"2A25\", BLERead, \"Dummy Testing Lock\");\n\nBLEService lockMechanismService(\"43AAF900-5FF0-4633-95A2-FE4189EE103B\");\nBLEUnsignedCharCharacteristic targetStateCharacteristic(\"43AAF901-5FF0-4633-95A2-FE4189EE103B\", BLEWrite | BLERead | BLENotify);\nBLEUnsignedCharCharacteristic currentStateCharacteristic(\"43AAF902-5FF0-4633-95A2-FE4189EE103B\", BLERead | BLENotify);\n\n\nvoid setup() {\n  Serial.begin(115200);\n  pinMode(pinStateLED, OUTPUT);\n\n  ble.setLocalName(\"Lock\");\n  ble.setAdvertisedServiceUuid(lockMechanismService.uuid());\n\n  ble.addAttribute(lockMechanismService);\n  ble.addAttribute(targetStateCharacteristic);\n  ble.addAttribute(currentStateCharacteristic);\n  targetStateCharacteristic.setValueLE(0);\n  currentStateCharacteristic.setValueLE(0);\n  digitalWrite(pinStateLED, 0);\n\n  ble.setEventHandler(BLEConnected, centralConnect);\n  ble.setEventHandler(BLEDisconnected, centralDisconnect);\n\n  ble.begin();\n  Serial.println(\"Bluetooth on\");\n}\n\nvoid loop() {\n  ble.poll();\n\n  if (targetStateCharacteristic.valueLE() != currentStateCharacteristic.valueLE()) {\n    unsigned char state = targetStateCharacteristic.valueLE();\n    delay(500);\n    digitalWrite(pinStateLED, (bool) state);\n    currentStateCharacteristic.setValueLE(state);\n    Serial.print(\"Lock state | \");\n    Serial.println(state);    \n  }\n}\n\n\nvoid centralConnect(BLECentral& central) {\n  Serial.print(\"Central connected | \");\n  Serial.println(central.address());\n}\n\nvoid centralDisconnect(BLECentral& central) {\n  Serial.print(\"Central disconnected | \");\n  Serial.println(central.address());\n}\n\n"
  },
  {
    "path": "examples/lock/arduino101/lock.cpp",
    "content": "#include \"lock.h\"\n\n//#define DEBUG(message) Serial.print(message)\n#define DEBUG(message)\n\n\nLock::Lock(Sensor& sensor1A_, Sensor& sensor1B_, Sensor& sensor2A_, Sensor& sensor2B_,\n           Motor& motor_, const bool lockClockwise_) :\n  working(false), sensor1A(sensor1A_), sensor1B(sensor1B_), sensor2A(sensor2A_), sensor2B(sensor2B_),\n  motor(motor_), lockClockwise(lockClockwise_)\n{ }\n\nvoid Lock::begin() {\n  DEBUG(\"Lock::begin()\\n\");\n  motor.begin();\n  rotate(Position.Neutral, Position.Any, false, false);\n  lastState = Position.Unlocked;\n}\n\nuint8_t Lock::state() {\n  switch (orange()) {\n    case Position.Jammed:\n      lastState = Position.Jammed;\n      return State.Jammed;\n    case Position.Unlocked:\n      if (lastState != Position.Unlocked) {\n        DEBUG(\"Lock::state() = Unsecured (Manually)\\n\");\n        lastState = Position.Unlocked;\n      }\n      return State.Unsecured;\n    case Position.Locked:\n      if (lastState != Position.Locked) {\n        DEBUG(\"Lock::state() = Secured (Manually)\\n\");\n        lastState = Position.Locked;\n      }\n      return State.Secured;\n    case Position.Unknown:\n      return lastState;\n  }\n}\n\nbool Lock::set(uint8_t state) {\n  switch (state) {\n    case State.Secured:\n      DEBUG(\"Lock::set(Secured)\\n\");\n      if (!rotate(Position.Any, Position.Locked, lockClockwise)) {\n        DEBUG(\"Full lock failed\\n\");\n        return false;\n      }\n      delay(Delay.DirectionChange);\n      if (!rotate(Position.Neutral, Position.Any, !lockClockwise)) {\n        DEBUG(\"Parking back to neutral failed\\n\");\n        return false;\n      }\n      lastState = state;\n      return true;\n    case State.Unsecured:\n      DEBUG(\"Lock::set(Unsecured)\\n\");\n      if (!rotate(Position.Any, Position.Unlocked, !lockClockwise)) {\n        DEBUG(\"Full unlock failed\\n\");\n        return false;\n      }\n      delay(Delay.DirectionChange);\n      if (!rotate(Position.Neutral, Position.Any, lockClockwise)) {\n        DEBUG(\"Parking back to neutral failed\\n\");\n        return false;\n      }\n      lastState = state;\n      return true;\n    default:\n      DEBUG(\"Lock::set(Neutral)\\n\");\n      rotate(Position.Neutral, Position.Any, false, false);\n      lastState = state;\n      return true;\n  }\n}\n\nbool Lock::rotate(uint8_t blck, uint8_t orng, bool clockwise, bool sure) {\n  DEBUG(\"Lock::rotate(blck=\"); DEBUG(blck); DEBUG(\", orng=\"); DEBUG(orng);\n  DEBUG(\", clkws=\"); DEBUG(clockwise); DEBUG(\")\\n\");\n  static bool recursion = false;\n\n  working = true;\n  timeout = millis();\n  motor.start(clockwise);\n\n  do {\n    if ((!sure) && (blck == Position.Neutral)) {\n      if ((black() == Position.Locked) || (black() == Position.Unlocked)) {\n        /* Wrong direction while trying to reach mid-point, back out */\n        DEBUG(\"Reverse\\n\");\n        motor.stop();\n        working = false;\n        delay(Delay.DirectionChange);\n        if (!recursion) {\n          bool direction = (black() == Position.Unlocked);\n          bool retval = rotate(Position.Neutral, Position.Any, direction);\n          return retval;\n        }\n      }\n    }\n    if (black() == Position.Jammed) {\n      /* Ooooppss... */\n      DEBUG(\"Jammed!!!\\n\");\n      motor.stop();\n      delay(Delay.DirectionChange);\n      if (!recursion) {\n        recursion = true;\n        uint32_t keep = timeout;\n        rotate(Position.Neutral, Position.Any, !clockwise);\n        recursion = false;\n        timeout = keep;\n        working = true;\n      }\n      return false;\n    }\n    /* Keep cranking... */\n  } while ( ((black() != blck) || (blck == Position.Any)) &&\n           ((orange() != orng) || (orng == Position.Any)) );\n  \n  if ((orng == Position.Locked) || (orng == Position.Unlocked)) {\n    /* Keep cranking for a bit longer when locking/unlocking to fully extend/retract the bolt */\n    delay(Delay.Override);\n  }\n\n  motor.stop();\n  working = false;\n  return true;\n}\n\nuint8_t Lock::black() {\n  DEBUG(\"Lock:black(2A=\"); DEBUG(sensor2A); DEBUG(\", 2B=\"); DEBUG(sensor2B); DEBUG(\")\");\n\n  if (working && ((millis() - timeout) > Delay.Timeout)) {\n    DEBUG(\" = Jammed\\n\");\n    return Position.Jammed;\n  }\n\n  if (lockClockwise) {\n    if ((sensor2A == HIGH) && (sensor2B == HIGH)) {\n      /* Black ring parked at neutral mid-point */\n      DEBUG(\" = Neutral\\n\");\n      return Position.Neutral;\n    }\n    if ((sensor2A == LOW ) && (sensor2B == HIGH)) {\n      /* Black ring rotated all the way clockwise */\n      DEBUG(\" = Locked\\n\");\n      return Position.Locked;\n    }\n    if ((sensor2A == HIGH) && (sensor2B == LOW )) {\n      /* Black ring rotated all the way counter-clockwise */\n      DEBUG(\" = Unlocked\\n\");\n      return Position.Unlocked;\n    }\n    DEBUG(\" = Unknown\\n\");\n    return Position.Unknown;\n  } else {\n    if ((sensor2A == HIGH) && (sensor2B == HIGH)) {\n      /* Black ring parked at neutral mid-point */\n      DEBUG(\" = Neutral\\n\");\n      return Position.Neutral;\n    }\n    if ((sensor2A == LOW ) && (sensor2B == HIGH)) {\n      /* Black ring rotated all the way clockwise */\n      DEBUG(\" = Unlocked\\n\");\n      return Position.Unlocked;\n    }\n    if ((sensor2A == HIGH) && (sensor2B == LOW )) {\n      /* Black ring rotated all the way counter-clockwise */\n      DEBUG(\" = Locked\\n\");\n      return Position.Locked;\n    }\n    DEBUG(\" = Unknown\\n\");\n    return Position.Unknown;\n  }\n}\n\nuint8_t Lock::orange() {\n  if (working && ((millis() - timeout) > Delay.Timeout)) {\n    return Position.Jammed;\n  }\n\n  if (lockClockwise) {\n    if ((sensor1A == HIGH) && (sensor1B == LOW )) {\n      /* Orange ring rotated all the way clockwise relative to the black ring */\n      return Position.Unlocked;\n    }\n    if ((sensor1A == LOW ) && (sensor1B == HIGH)) {\n      /* Orange ring rotated all the way counter-clockwise relative to the black ring */\n      return Position.Locked;\n    }\n    return Position.Unknown;\n  } else {\n    if ((sensor1A == HIGH) && (sensor1B == LOW )) {\n      /* Orange ring rotated all the way clockwise relative to the black ring */\n      return Position.Locked;\n    }\n    if ((sensor1A == LOW ) && (sensor1B == HIGH)) {\n      /* Orange ring rotated all the way counter-clockwise relative to the black ring */\n      return Position.Unlocked;\n    }\n    return Position.Unknown;\n  }\n}\n\n"
  },
  {
    "path": "examples/lock/arduino101/lock.h",
    "content": "#ifndef _LOCK_H_\n#define _LOCK_H_\n\n#include <Arduino.h>\n\n#include \"sensor.h\"\n#include \"motor.h\"\n\n\nclass Lock {\n  public:\n    Lock(Sensor& sensor1A_, Sensor& sensor1B_, Sensor& sensor2A_, Sensor& sensor2B_,\n           Motor& motor_, const bool lockClockwise_);\n\n    void begin();\n    uint8_t state(void);\n    bool set(uint8_t state);\n\n    static struct LockState { // HAP-NodeJS/lib/gen/HomeKitTypes.js #897\n      static const uint8_t Unsecured = 0;\n      static const uint8_t Secured = 1;\n      static const uint8_t Jammed = 2;\n      static const uint8_t Unknown = 3;\n    } State;\n\n  private:\n    bool rotate(uint8_t blck, uint8_t orng, bool clockwise = true, bool sure = true);\n    uint8_t orange();\n    uint8_t black();\n\n    static struct RingPosition {\n      static const uint8_t Unlocked = 0;\n      static const uint8_t Locked = 1;\n      static const uint8_t Jammed = 2;\n      static const uint8_t Unknown = 3;\n      static const uint8_t Neutral = 4;\n      static const uint8_t Any = ~0;\n    } Position;\n\n    static struct LockTimeDelay {\n      static const uint32_t Timeout = 3000; // milliseconds\n      static const uint32_t DirectionChange = 300; // milliseconds\n      static const uint32_t Override = 500; // milliseconds - needs to be tuned for each lock\n    } Delay;\n\n    bool working;\n    uint32_t timeout; // milliseconds - overflows after ~50 days\n    uint8_t lastState;\n\n    Sensor& sensor1A;\n    Sensor& sensor1B;\n    Sensor& sensor2A;\n    Sensor& sensor2B;\n    Motor& motor;\n\n    const bool lockClockwise;\n};\n\n#endif\n\n"
  },
  {
    "path": "examples/lock/arduino101/motor.cpp",
    "content": "#include \"motor.h\"\n\n// #define DEBUG(message) Serial.print(message)\n#define DEBUG(message)\n\n\nMotor::Motor(const uint32_t minusPin_, const uint32_t plusPin_,\n             const uint32_t pwmPin_, const uint8_t pwm_) :\n  minusPin(minusPin_),\n  plusPin(plusPin_),\n  pwmPin(pwmPin_),\n  pwm(pwm_)\n{ }\n\nvoid Motor::begin() {\n  pinMode(minusPin, OUTPUT);\n  pinMode(plusPin, OUTPUT);\n  pinMode(pwmPin, OUTPUT);\n}\n\nvoid Motor::start(bool clockwise) {\n  analogWrite(pwmPin, pwm);\n  if (clockwise) {\n    digitalWrite(minusPin, HIGH);\n    digitalWrite(plusPin, LOW);\n  } else {\n    digitalWrite(minusPin, LOW);\n    digitalWrite(plusPin, HIGH);\n  }\n  DEBUG(\"Motor::start(clkws=\"); DEBUG(clockwise); DEBUG(\")\\n\");\n}\n\nvoid Motor::stop() {\n  analogWrite(pwmPin, 0);\n  digitalWrite(minusPin, LOW);\n  digitalWrite(plusPin, LOW);\n  DEBUG(\"Motor::stop()\\n\");\n}\n\nMotor::~Motor() {\n  stop();\n  DEBUG(\"Motor::destructor()\\n\");\n}\n\n"
  },
  {
    "path": "examples/lock/arduino101/motor.h",
    "content": "#ifndef _MOTOR_H_\n#define _MOTOR_H_\n\n#include <Arduino.h>\n\n\nclass Motor {\n  public:\n    Motor(const uint32_t minusPin_, const uint32_t plusPin_,\n          const uint32_t pwmPin_, const uint8_t pwm_);\n    ~Motor();\n\n    void begin();\n    void start(bool clockwise = true);\n    void stop();\n\n  private:\n    const uint32_t minusPin;\n    const uint32_t plusPin;\n    const uint32_t pwmPin;\n    const uint8_t pwm;\n};\n\n#endif\n\n"
  },
  {
    "path": "examples/lock/arduino101/sensor.cpp",
    "content": "#include \"sensor.h\"\n\n// #define DEBUG(message) Serial.print(message)\n#define DEBUG(message)\n\n\nSensor::Sensor(uint32_t pin_) :\n  pin(pin_)\n{\n  pinMode(pin, INPUT);\n}\n\nSensor::operator int() {\n  int retval = digitalRead(pin);\n  DEBUG(\"Sensor::int(pin=\"); DEBUG(pin); DEBUG(\", val=\"); DEBUG(retval); DEBUG(\")\\n\");\n  return retval;\n}\n\n"
  },
  {
    "path": "examples/lock/arduino101/sensor.h",
    "content": "#ifndef _SENSOR_H_\n#define _SENSOR_H_\n\n#include <Arduino.h>\n\n\nclass Sensor {\n  public:\n    Sensor(uint32_t pin_);\n\n    operator int();\n\n  private:\n    const uint32_t pin;\n};\n\n#endif\n\n"
  },
  {
    "path": "examples/lock/config.json",
    "content": "{\n  \"bridge\": {\n    \"name\": \"Raspberry Pi 3\",\n    \"username\": \"CC:22:3D:E3:CE:30\",\n    \"port\": 51826,\n    \"pin\": \"314-15-926\"\n  },\n  \"description\": \"Raspberry Pi 3 Homebridge-Bluetooth RGB Lightbulb Example\",\n  \"platforms\": [\n    {\n      \"platform\": \"Bluetooth\",\n      \"accessories\": [\n        {\n          \"name\": \"Arduino\",\n          \"address\": \"01:23:45:67:89:AB\",\n          \"services\": [\n            {\n              \"name\": \"Lock\",\n              \"type\": \"LockMechanism\",\n              \"UUID\": \"43AAF900-5FF0-4633-95A2-FE4189EE103B\",\n              \"characteristics\": [\n                {\n                  \"type\": \"LockTargetState\",\n                  \"UUID\": \"43AAF901-5FF0-4633-95A2-FE4189EE103B\"\n                },\n                {\n                  \"type\": \"LockCurrentState\",\n                  \"UUID\": \"43AAF902-5FF0-4633-95A2-FE4189EE103B\"\n                }\n              ]\n            }\n          ]\n        }\n      ]\n    }\n  ]\n}\n"
  },
  {
    "path": "examples/lock/readme.md",
    "content": "\n# Lock\n\n\nTurn an old _Lockitron V1_ body connected to a BLE capable microprocessor into a wireless HomeKit lock. Use the Home app or Siri on your Apple device to secure and unsecure the lock.\n\n<img src=\"images/lock.jpg\">\n\nThis example uses [Arduino 101](https://www.arduino.cc/en/Main/ArduinoBoard101) or [RFduino](http://www.rfduino.com/) and [Raspberry Pi 3](https://www.raspberrypi.org/). Generally, any programmable BLE peripheral and a box capable of running [Node.js](https://nodejs.org) with [Noble](https://github.com/sandeepmistry/noble) will work. You'll also need a [H-Bridge breakout](https://www.adafruit.com/product/2448) to power the motor and an old _Lockitron V1_ body . It's sold by [Sparkfun](https://www.sparkfun.com/products/retired/13648), [Adafruit](https://www.adafruit.com/products/2579) or [eBay](http://www.ebay.com/sch/i.html?_from=R40&_trksid=p2050601.m570.l1313.TR12.TRC2.A0.H0.Xlockitron.TRS0&_nkw=lockitron&_sacat=0) :).\n\n\n## Lock Mechanism\n\n### Installation\n\nHere's the official [Installation Manual](https://cdn.sparkfun.com/datasheets/Components/General/installation_manual_lockitron.pdf). Or if you preffer here's the [Installation Video](https://www.youtube.com/watch?v=ZOJhfsSCoYs).\n\n[![Installation Video](https://img.youtube.com/vi/ZOJhfsSCoYs/0.jpg)](https://www.youtube.com/watch?v=ZOJhfsSCoYs)\n\n### Wiring\n\nHere's how the lock looks inside, when you take off the black cover. The lock uses tactile switch sensors to detect position of the orange and black rings. Sparkfun has a nice article about the hookup [here](https://learn.sparkfun.com/tutorials/lockitron-hardware-hookup-guide?_ga=1.268388430.1924023418.1474989120). I've borrowed some pics from them. Generally, you want to solder wire to each sensor and possibly to extend the battery and motor wires to reach outside of the case.\n\n<img src=\"lockitron/internals.jpg\" width=\"30%\">\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n<img src=\"lockitron/sensors.jpg\" width=\"50%\">\n\nIf you use _RFDuino_ and want to power the whole thing from the batteries, you'll want add a voltage regulator. Theoretically, you could add another wire to the battery pack and just use the voltage of two AA batteries, but the motor is quite hungry and eats about 2 A when running. The voltage of the two batteries drop below 1.9 V and the poor _RFduino_ resets. This doesn't happen with the regulator.\n\nI've managed to put the voltage regulator on the [proto shield](http://www.rfduino.com/product/rfd22125-proto-shield-for-rfduino/index.html). If you cut and throw away some plastics, it's possible to squeeze the _RFDuino_ inside of the original case.\n\n<img src=\"lockitron/detail.jpg\" width=\"45%\">\n\n\n## BLE Accessory (Arduino 101, RFDuino or Other BLE Board)\n\nDownload and install the latest version of the [Arduino IDE](https://www.arduino.cc/en/Main/Software). If you're totally new to microcontrollers take some time to go through an introductory tutorial and learn how to make a LED blink. This will help you to understand how to use the IDE, how to upload a sketch and what is the code actually doing.\n\n### Wiring\n\nConnect your board to the H-Bridge breakout, voltage regulator and lock according the the following schematics. This may, again, require some soldering.\n\n<img src=\"arduino101/arduino101.png\" width=\"45%\">\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n<img src=\"rfduino/rfduino.png\" width=\"45%\">\n\n**Note** _Alternatively, you can use any of the many BLE boards available on the market ([BlueBean](https://punchthrough.com/bean/), [RedBearLabs BLE Nano](http://redbearlab.com/blenano), ...) as long as you keep UUIDs of the services and characteristics in sync with your `config.json` file, everything will work just fine._\n\n\n### Running the Sketch\nCompile, run and upload the [arduino101.ino](arduino101/arduino101.ino) or [rfduino.ino](rfduino/rfduino.ino) sketch using the [Arduino IDE](https://www.arduino.cc/en/Main/Software).\nThe sketch creates a BLE service with 2 characteristics. There's one characteristic for the lock target state (`Unsecured/Secured`) and the other for the lock current state (`Unsecured/Secured/Jammed/Unknown`). Only the target characteristic is writeable ans is used to trigger the locking mechanism.\n\n```cpp\nBLEService lockMechanismService(\"43AAF900-5FF0-4633-95A2-FE4189EE103B\");\nBLEUnsignedCharCharacteristic targetStateCharacteristic(\"43AAF901-5FF0-4633-95A2-FE4189EE103B\",\n                                                        BLEWrite | BLERead | BLENotify);\nBLEUnsignedCharCharacteristic currentStateCharacteristic(\"43AAF902-5FF0-4633-95A2-FE4189EE103B\",\n                                                         BLERead | BLENotify);\n```\n\nWhen the tactile switch is toggled the LEDs turn on (or turn off if they were on) and the BLE subscribe-notification mechanism cases the an update update on the Homebridge. This way the information about switching propagates through callbacks to the Apple device without any polling.\n\nTake a look into [this file](https://github.com/KhaosT/HAP-NodeJS/blob/master/lib/gen/HomeKitTypes.js#L2896) to see the full definition of the _LockMechanism_ service.\n\nOnce the BLE central device is setup, it connects to this characteristic and exposes it via Homebridge as a HomeKit accessory of type _LockMechanism_. The sketch also contains some logic to handle jamming and other corner cases.\n\nLeave the device powered on and the sketch running while you setup the Homebridge server. The sketch has some built-in logging, so keeping the Serial monitor open may be helpful for debugging.\n\n\n## BLE Central & Homebridge Server (Raspberry Pi 3 or Other Compatible Box)\n\nFor help installing an operating system on your new Pi, the official documentation contains a couple of [nice videos](https://www.raspberrypi.org/help/videos/).\n\n### Wiring\nNo wiring except for the micro-USB cable providing power is needed. The Pi needs to be connected to the same router (subnet) as the Apple device you plan to use. It doesn't matter whether via Wifi or Ethernet. Otherwise, you won't be able discover and connect to the Homebridge server running on the Pi.\n\n<img src=\"images/raspberry.png\" width=\"30%\">\n\n**Note** _Alternatively, you can use a Raspberry Pi 2 with a supported USB BLE dongle instead of the Pi 3._\n\n### Running Homebridge\nRunning Homebridge on a Raspberry Pi is straightforward. Follow [this guide](https://github.com/nfarina/homebridge/wiki/Running-HomeBridge-on-a-Raspberry-Pi) to install Homebridge server and then run the following command to install the homebridge-bluetooth plugin:\n\n```sh\n[sudo] npm install -g homebridge-bluetooth\n```\n\nEdit the `~/.homebridge/config.json`, name your Homebridge server and add a new accessory to allow the plugin to connect to the BLE service running on the Arduino:\n\n```js\n\"name\": \"Arduino\",\n\"address\": \"01:23:45:67:89:AB\",\n\"services\": [ {\n    \"name\": \"Lock\",\n    \"type\": \"LockMechanism\",\n    \"UUID\": \"43AAF900-5FF0-4633-95A2-FE4189EE103B\",\n    \"characteristics\": [ {\n        \"type\": \"LockTargetState\",\n        \"UUID\": \"43AAF901-5FF0-4633-95A2-FE4189EE103B\"\n      }, {\n        \"type\": \"LockCurrentState\",\n        \"UUID\": \"43AAF902-5FF0-4633-95A2-FE4189EE103B\"\n      } ]\n   } ]\n```\n\nFinally, start the Homebridge server. If you use Linux you may need to run with higher privileges in order to have access to the BLE hardware layer. See [this link](https://github.com/sandeepmistry/noble#running-without-rootsudo) for more details about running without `sudo`.\n\n```\n[sudo] homebridge -D\n```\n\n**Note** _Running with `-D` turns on additional debugging output that is very helpful for getting addresses and UUIDs of your BLE devices that needs to match with the `config.json` file._\n\n<img src=\"images/homebridge.png\">\n\n**Note** _Homebridge server doesn't run only on Linux. MacOS and Windows machines are also supported given they have a built-in BLE adapter or an USB dongle. For more details see supported platforms of [Homebridge](https://github.com/nfarina/homebridge) and [Noble](https://github.com/sandeepmistry/noble)._\n\n\n## Apple Device\n\n### Pairing\nOpen Home app and tap the '+' button to add new accessory. When you attempt to add the 'Raspberry Pi 3' bridge, it will ask for a \"PIN\" from the `config.json` file. Once you are paired with your new Rapsberry Homebridge server all the Arduino accesories are added at the same time as the bridge.\n\n### Interacting\nOnce your BLE accessory has been added to HomeKit database, besides using the Home app or Control Center at the bottom of the screen, you should be able to tell Siri to control any HomeKit accessory. Try _\"Hey Siri, lock the Arduino\"_. However, Siri is a cloud service and iOS may need some time to synchronize your HomeKit database to iCloud.\n\n<img src=\"images/ios-home.png\" width=\"30%\">\n<img src=\"images/ios-unlocked.png\" width=\"30%\">\n<img src=\"images/ios-siri.png\" width=\"30%\">\n"
  },
  {
    "path": "examples/lock/rfduino/lock.cpp",
    "content": "#include \"lock.h\"\n\n// #define DEBUG(message) Serial.print(message)\n#define DEBUG(message)\n\n\nLock::Lock(Sensor& sensor1A_, Sensor& sensor1B_, Sensor& sensor2A_, Sensor& sensor2B_,\n           Motor& motor_, const bool lockClockwise_) :\n  working(false), sensor1A(sensor1A_), sensor1B(sensor1B_), sensor2A(sensor2A_), sensor2B(sensor2B_),\n  motor(motor_), lockClockwise(lockClockwise_)\n{ }\n\nvoid Lock::begin() {\n  DEBUG(\"Lock::begin()\\n\");\n  motor.begin();\n  rotate(Position.Neutral, Position.Any, false, false);\n  lastState = Position.Unlocked;\n}\n\nuint8_t Lock::state() {\n  uint8_t orng = orange();\n  if (orng == Position.Jammed) {\n    lastState = Position.Jammed;\n    return State.Jammed;\n  } else if (orng == Position.Unlocked) {\n    if (lastState != Position.Unlocked) {\n      DEBUG(\"Lock::state() = Unsecured (Manually)\\n\");\n      lastState = Position.Unlocked;\n    }\n    return State.Unsecured;\n  } else if (orng == Position.Locked) {\n    if (lastState != Position.Locked) {\n      DEBUG(\"Lock::state() = Secured (Manually)\\n\");\n      lastState = Position.Locked;\n    }\n    return State.Secured;\n  } else if (orng == Position.Unknown) {\n    return lastState;\n  }\n}\n\nbool Lock::set(uint8_t state) {\n  if (state == State.Secured) {\n    DEBUG(\"Lock::set(Secured)\\n\");\n    if (!rotate(Position.Any, Position.Locked, lockClockwise)) {\n      DEBUG(\"Full lock failed\\n\");\n      return false;\n    }\n    delay(Delay.DirectionChange);\n    if (!rotate(Position.Neutral, Position.Any, !lockClockwise)) {\n      DEBUG(\"Parking back to neutral failed\\n\");\n      return false;\n    }\n    lastState = state;\n    return true;\n  } else if (state == State.Unsecured) {\n    DEBUG(\"Lock::set(Unsecured)\\n\");\n    if (!rotate(Position.Any, Position.Unlocked, !lockClockwise)) {\n      DEBUG(\"Full unlock failed\\n\");\n      return false;\n    }\n    delay(Delay.DirectionChange);\n    if (!rotate(Position.Neutral, Position.Any, lockClockwise)) {\n      DEBUG(\"Parking back to neutral failed\\n\");\n      return false;\n    }\n    lastState = state;\n    return true;\n  } else {\n    DEBUG(\"Lock::set(Neutral)\\n\");\n    rotate(Position.Neutral, Position.Any, false, false);\n    lastState = state;\n    return true;\n  }\n}\n\nbool Lock::rotate(uint8_t blck, uint8_t orng, bool clockwise, bool sure) {\n  DEBUG(\"Lock::rotate(blck=\"); DEBUG(blck); DEBUG(\", orng=\"); DEBUG(orng);\n  DEBUG(\", clkws=\"); DEBUG(clockwise); DEBUG(\")\\n\");\n  static bool recursion = false;\n\n  working = true;\n  timeout = millis();\n  motor.start(clockwise);\n\n  do {\n    if ((!sure) && (blck == Position.Neutral)) {\n      if ((black() == Position.Locked) || (black() == Position.Unlocked)) {\n        /* Wrong direction while trying to reach mid-point, back out */\n        DEBUG(\"Reverse\\n\");\n        motor.stop();\n        working = false;\n        delay(Delay.DirectionChange);\n        if (!recursion) {\n          bool direction = (black() == Position.Unlocked);\n          bool retval = rotate(Position.Neutral, Position.Any, direction);\n          return retval;\n        }\n      }\n    }\n    if (black() == Position.Jammed) {\n      /* Ooooppss... */\n      DEBUG(\"Jammed!!!\\n\");\n      motor.stop();\n      delay(Delay.DirectionChange);\n      if (!recursion) {\n        recursion = true;\n        uint32_t keep = timeout;\n        rotate(Position.Neutral, Position.Any, !clockwise);\n        recursion = false;\n        timeout = keep;\n        working = true;\n      }\n      return false;\n    }\n    /* Keep cranking... */\n  } while ( ((black() != blck) || (blck == Position.Any)) &&\n           ((orange() != orng) || (orng == Position.Any)) );\n  \n  if ((orng == Position.Locked) || (orng == Position.Unlocked)) {\n    /* Keep cranking for a bit longer when locking/unlocking to fully extend/retract the bolt */\n    delay(Delay.Override);\n  }\n\n  motor.stop();\n  working = false;\n  return true;\n}\n\nuint8_t Lock::black() {\n  DEBUG(\"Lock:black(2A=\"); DEBUG(sensor2A); DEBUG(\", 2B=\"); DEBUG(sensor2B); DEBUG(\")\");\n\n  if (working && ((millis() - timeout) > Delay.Timeout)) {\n    DEBUG(\" = Jammed\\n\");\n    return Position.Jammed;\n  }\n\n  if (lockClockwise) {\n    if ((sensor2A == HIGH) && (sensor2B == HIGH)) {\n      /* Black ring parked at neutral mid-point */\n      DEBUG(\" = Neutral\\n\");\n      return Position.Neutral;\n    }\n    if ((sensor2A == LOW ) && (sensor2B == HIGH)) {\n      /* Black ring rotated all the way clockwise */\n      DEBUG(\" = Locked\\n\");\n      return Position.Locked;\n    }\n    if ((sensor2A == HIGH) && (sensor2B == LOW )) {\n      /* Black ring rotated all the way counter-clockwise */\n      DEBUG(\" = Unlocked\\n\");\n      return Position.Unlocked;\n    }\n    DEBUG(\" = Unknown\\n\");\n    return Position.Unknown;\n  } else {\n    if ((sensor2A == HIGH) && (sensor2B == HIGH)) {\n      /* Black ring parked at neutral mid-point */\n      DEBUG(\" = Neutral\\n\");\n      return Position.Neutral;\n    }\n    if ((sensor2A == LOW ) && (sensor2B == HIGH)) {\n      /* Black ring rotated all the way clockwise */\n      DEBUG(\" = Unlocked\\n\");\n      return Position.Unlocked;\n    }\n    if ((sensor2A == HIGH) && (sensor2B == LOW )) {\n      /* Black ring rotated all the way counter-clockwise */\n      DEBUG(\" = Locked\\n\");\n      return Position.Locked;\n    }\n    DEBUG(\" = Unknown\\n\");\n    return Position.Unknown;\n  }\n}\n\nuint8_t Lock::orange() {\n  if (working && ((millis() - timeout) > Delay.Timeout)) {\n    return Position.Jammed;\n  }\n\n  if (lockClockwise) {\n    if ((sensor1A == HIGH) && (sensor1B == LOW )) {\n      /* Orange ring rotated all the way clockwise relative to the black ring */\n      return Position.Unlocked;\n    }\n    if ((sensor1A == LOW ) && (sensor1B == HIGH)) {\n      /* Orange ring rotated all the way counter-clockwise relative to the black ring */\n      return Position.Locked;\n    }\n    return Position.Unknown;\n  } else {\n    if ((sensor1A == HIGH) && (sensor1B == LOW )) {\n      /* Orange ring rotated all the way clockwise relative to the black ring */\n      return Position.Locked;\n    }\n    if ((sensor1A == LOW ) && (sensor1B == HIGH)) {\n      /* Orange ring rotated all the way counter-clockwise relative to the black ring */\n      return Position.Unlocked;\n    }\n    return Position.Unknown;\n  }\n}\n\n"
  },
  {
    "path": "examples/lock/rfduino/lock.h",
    "content": "#ifndef _LOCK_H_\n#define _LOCK_H_\n\n#include <Arduino.h>\n\n#include \"sensor.h\"\n#include \"motor.h\"\n\n\nclass Lock {\n  public:\n    Lock(Sensor& sensor1A_, Sensor& sensor1B_, Sensor& sensor2A_, Sensor& sensor2B_,\n           Motor& motor_, const bool lockClockwise_);\n\n    void begin();\n    uint8_t state(void);\n    bool set(uint8_t state);\n\n    const static struct LockState { // HAP-NodeJS/lib/gen/HomeKitTypes.js #897\n      static const uint8_t Unsecured = 0;\n      static const uint8_t Secured = 1;\n      static const uint8_t Jammed = 2;\n      static const uint8_t Unknown = 3;\n    } State;\n\n  private:\n    bool rotate(uint8_t blck, uint8_t orng, bool clockwise = true, bool sure = true);\n    uint8_t orange();\n    uint8_t black();\n\n    const static struct RingPosition {\n      static const uint8_t Unlocked = 0;\n      static const uint8_t Locked = 1;\n      static const uint8_t Jammed = 2;\n      static const uint8_t Unknown = 3;\n      static const uint8_t Neutral = 4;\n      static const uint8_t Any = ~0;\n    } Position;\n\n    const static struct LockTimeDelay {\n      static const uint32_t Timeout = 3000; // milliseconds\n      static const uint32_t DirectionChange = 300; // milliseconds\n      static const uint32_t Override = 500; // milliseconds - needs to be tuned for each lock\n    } Delay;\n\n    bool working;\n    uint32_t timeout; // milliseconds - overflows after ~50 days\n    uint8_t lastState;\n\n    Sensor& sensor1A;\n    Sensor& sensor1B;\n    Sensor& sensor2A;\n    Sensor& sensor2B;\n    Motor& motor;\n\n    const bool lockClockwise;\n};\n\n#endif\n"
  },
  {
    "path": "examples/lock/rfduino/motor.cpp",
    "content": "#include \"motor.h\"\n\n// #define DEBUG(message) Serial.print(message)\n#define DEBUG(message)\n\n\nMotor::Motor(const uint32_t minusPin_, const uint32_t plusPin_,\n             const uint32_t pwmPin_, const uint8_t pwm_) :\n  minusPin(minusPin_),\n  plusPin(plusPin_),\n  pwmPin(pwmPin_),\n  pwm(pwm_)\n{ }\n\nvoid Motor::begin() {\n  pinMode(minusPin, OUTPUT);\n  pinMode(plusPin, OUTPUT);\n  pinMode(pwmPin, OUTPUT);\n}\n\nvoid Motor::start(bool clockwise) {\n  analogWrite(pwmPin, pwm);\n  if (clockwise) {\n    digitalWrite(minusPin, HIGH);\n    digitalWrite(plusPin, LOW);\n  } else {\n    digitalWrite(minusPin, LOW);\n    digitalWrite(plusPin, HIGH);\n  }\n  DEBUG(\"Motor::start(clkws=\"); DEBUG(clockwise); DEBUG(\")\\n\");\n}\n\nvoid Motor::stop() {\n  analogWrite(pwmPin, 0);\n  digitalWrite(minusPin, LOW);\n  digitalWrite(plusPin, LOW);\n  DEBUG(\"Motor::stop()\\n\");\n}\n\nMotor::~Motor() {\n  stop();\n  DEBUG(\"Motor::destructor()\\n\");\n}\n\n"
  },
  {
    "path": "examples/lock/rfduino/motor.h",
    "content": "#ifndef _MOTOR_H_\n#define _MOTOR_H_\n\n#include <Arduino.h>\n\n\nclass Motor {\n  public:\n    Motor(const uint32_t minusPin_, const uint32_t plusPin_,\n          const uint32_t pwmPin_, const uint8_t pwm_);\n    ~Motor();\n\n    void begin();\n    void start(bool clockwise = true);\n    void stop();\n\n  private:\n    const uint32_t minusPin;\n    const uint32_t plusPin;\n    const uint32_t pwmPin;\n    const uint8_t pwm;\n};\n\n#endif\n\n"
  },
  {
    "path": "examples/lock/rfduino/rfduino.ino",
    "content": "#include <Arduino.h>\n#include <BLEPeripheral.h>\n#include \"sensor.h\"\n#include \"motor.h\"\n#include \"lock.h\"\n\n\nstatic struct BoardPins {\n  const uint8_t Motor1 = 0;\n  const uint8_t Motor2 = 1;\n  const uint8_t MotorPWM = 2;\n  const uint8_t Sensor1A = 3;\n  const uint8_t Sensor1B = 4;\n  const uint8_t Sensor2A = 5;\n  const uint8_t Sensor2B = 6;\n} Pin;\n\n\nBLEPeripheral ble;\nBLEService informationService(\"180A\");\nBLECharacteristic modelCharacteristic(\"2A24\", BLERead, \"RFduino\");\nBLECharacteristic manufacturerCharacteristic(\"2A29\", BLERead, \"Lockitron\");\nBLECharacteristic serialNumberCharacteristic(\"2A25\", BLERead, \"V1\");\n\nBLEService lockMechanismService(\"43AAF900-5FF0-4633-95A2-FE4189EE103B\");\nBLEUnsignedCharCharacteristic targetStateCharacteristic(\"43AAF901-5FF0-4633-95A2-FE4189EE103B\",\n                                                        BLEWrite | BLERead | BLENotify);\nBLEUnsignedCharCharacteristic currentStateCharacteristic(\"43AAF902-5FF0-4633-95A2-FE4189EE103B\",\n                                                         BLERead | BLENotify);\n\nSensor sensor1A(Pin.Sensor1A);\nSensor sensor1B(Pin.Sensor1B);\nSensor sensor2A(Pin.Sensor2A);\nSensor sensor2B(Pin.Sensor2B);\nMotor motor(Pin.Motor1, Pin.Motor2, Pin.MotorPWM, 128);\nLock lock = Lock(sensor1A, sensor1B, sensor2A, sensor2B, motor, true);\nvolatile bool targetStateUpdate = false;\n\n\nvoid targetStateWritten(BLECentral& /*central*/, BLECharacteristic& /*characteristic*/) {\n   targetStateUpdate = true;\n}\n\n\nvoid setup() {\n  // DEBUG Serial.begin(115200);\n\n  ble.setLocalName(\"Lock\");\n  ble.addAttribute(informationService);\n  ble.addAttribute(modelCharacteristic);\n  ble.addAttribute(manufacturerCharacteristic);\n  ble.addAttribute(serialNumberCharacteristic);\n\n  ble.addAttribute(lockMechanismService);\n  ble.addAttribute(targetStateCharacteristic);\n  ble.addAttribute(currentStateCharacteristic);\n  targetStateCharacteristic.setEventHandler(BLEWritten, targetStateWritten);\n\n  ble.begin();\n  lock.begin();\n}\n\nvoid loop() {\n  ble.poll();\n  RFduino_ULPDelay(200);\n\n  if (targetStateUpdate) {\n    lock.set(targetStateCharacteristic.value());\n    currentStateCharacteristic.setValue(lock.state());\n    targetStateUpdate = false;\n  }\n\n  if (lock.state() != currentStateCharacteristic.value()) {\n    targetStateCharacteristic.setValue(lock.state());\n    currentStateCharacteristic.setValue(lock.state());\n  }\n}\n\n"
  },
  {
    "path": "examples/lock/rfduino/rfduino.sch",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!DOCTYPE eagle SYSTEM \"eagle.dtd\">\n<eagle version=\"7.5.0\">\n<drawing>\n<settings>\n<setting alwaysvectorfont=\"no\"/>\n<setting verticaltext=\"up\"/>\n</settings>\n<grid distance=\"0.1\" unitdist=\"inch\" unit=\"inch\" style=\"lines\" multiple=\"1\" display=\"no\" altdistance=\"0.01\" altunitdist=\"inch\" altunit=\"inch\"/>\n<layers>\n<layer number=\"1\" name=\"Top\" color=\"4\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"16\" name=\"Bottom\" color=\"1\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"17\" name=\"Pads\" color=\"2\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"18\" name=\"Vias\" color=\"2\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"19\" name=\"Unrouted\" color=\"6\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"20\" name=\"Dimension\" color=\"15\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"21\" name=\"tPlace\" color=\"7\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"22\" name=\"bPlace\" color=\"7\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"23\" name=\"tOrigins\" color=\"15\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"24\" name=\"bOrigins\" color=\"15\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"25\" name=\"tNames\" color=\"7\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"26\" name=\"bNames\" color=\"7\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"27\" name=\"tValues\" color=\"7\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"28\" name=\"bValues\" color=\"7\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"29\" name=\"tStop\" color=\"7\" fill=\"3\" visible=\"no\" active=\"no\"/>\n<layer number=\"30\" name=\"bStop\" color=\"7\" fill=\"6\" visible=\"no\" active=\"no\"/>\n<layer number=\"31\" name=\"tCream\" color=\"7\" fill=\"4\" visible=\"no\" active=\"no\"/>\n<layer number=\"32\" name=\"bCream\" color=\"7\" fill=\"5\" visible=\"no\" active=\"no\"/>\n<layer number=\"33\" name=\"tFinish\" color=\"6\" fill=\"3\" visible=\"no\" active=\"no\"/>\n<layer number=\"34\" name=\"bFinish\" color=\"6\" fill=\"6\" visible=\"no\" active=\"no\"/>\n<layer number=\"35\" name=\"tGlue\" color=\"7\" fill=\"4\" visible=\"no\" active=\"no\"/>\n<layer number=\"36\" name=\"bGlue\" color=\"7\" fill=\"5\" visible=\"no\" active=\"no\"/>\n<layer number=\"37\" name=\"tTest\" color=\"7\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"38\" name=\"bTest\" color=\"7\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"39\" name=\"tKeepout\" color=\"4\" fill=\"11\" visible=\"no\" active=\"no\"/>\n<layer number=\"40\" name=\"bKeepout\" color=\"1\" fill=\"11\" visible=\"no\" active=\"no\"/>\n<layer number=\"41\" name=\"tRestrict\" color=\"4\" fill=\"10\" visible=\"no\" active=\"no\"/>\n<layer number=\"42\" name=\"bRestrict\" color=\"1\" fill=\"10\" visible=\"no\" active=\"no\"/>\n<layer number=\"43\" name=\"vRestrict\" color=\"2\" fill=\"10\" visible=\"no\" active=\"no\"/>\n<layer number=\"44\" name=\"Drills\" color=\"7\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"45\" name=\"Holes\" color=\"7\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"46\" name=\"Milling\" color=\"3\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"47\" name=\"Measures\" color=\"7\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"48\" name=\"Document\" color=\"7\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"49\" name=\"Reference\" color=\"7\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"50\" name=\"dxf\" color=\"7\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"51\" name=\"tDocu\" color=\"7\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"52\" name=\"bDocu\" color=\"7\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"53\" name=\"tGND_GNDA\" color=\"7\" fill=\"9\" visible=\"no\" active=\"no\"/>\n<layer number=\"54\" name=\"bGND_GNDA\" color=\"1\" fill=\"9\" visible=\"no\" active=\"no\"/>\n<layer number=\"56\" name=\"wert\" color=\"7\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"57\" name=\"tCAD\" color=\"7\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"59\" name=\"tCarbon\" color=\"7\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"60\" name=\"bCarbon\" color=\"7\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"90\" name=\"Modules\" color=\"5\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"91\" name=\"Nets\" color=\"2\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"92\" name=\"Busses\" color=\"1\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"93\" name=\"Pins\" color=\"2\" fill=\"1\" visible=\"no\" active=\"yes\"/>\n<layer number=\"94\" name=\"Symbols\" color=\"4\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"95\" name=\"Names\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"96\" name=\"Values\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"97\" name=\"Info\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"98\" name=\"Guide\" color=\"6\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"99\" name=\"SpiceOrder\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"100\" name=\"Muster\" color=\"7\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"101\" name=\"Patch_Top\" color=\"12\" fill=\"4\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"102\" name=\"Vscore\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"103\" name=\"tMap\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"104\" name=\"Name\" color=\"16\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"105\" name=\"tPlate\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"106\" name=\"bPlate\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"107\" name=\"Crop\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"108\" name=\"fp8\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"109\" name=\"fp9\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"110\" name=\"fp0\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"111\" name=\"LPC17xx\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"112\" name=\"tSilk\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"113\" name=\"IDFDebug\" color=\"4\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"114\" name=\"Badge_Outline\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"115\" name=\"ReferenceISLANDS\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"116\" name=\"Patch_BOT\" color=\"9\" fill=\"4\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"118\" name=\"Rect_Pads\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"121\" name=\"_tsilk\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"122\" name=\"_bsilk\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"123\" name=\"tTestmark\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"124\" name=\"bTestmark\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"125\" name=\"_tNames\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"126\" name=\"_bNames\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"127\" name=\"_tValues\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"128\" name=\"_bValues\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"129\" name=\"Mask\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"131\" name=\"tAdjust\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"132\" name=\"bAdjust\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"144\" name=\"Drill_legend\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"150\" name=\"Notes\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"151\" name=\"HeatSink\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"152\" name=\"_bDocu\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"153\" name=\"FabDoc1\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"154\" name=\"FabDoc2\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"155\" name=\"FabDoc3\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"199\" name=\"Contour\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"200\" name=\"200bmp\" color=\"1\" fill=\"10\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"201\" name=\"201bmp\" color=\"2\" fill=\"10\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"202\" name=\"202bmp\" color=\"3\" fill=\"10\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"203\" name=\"203bmp\" color=\"4\" fill=\"10\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"204\" name=\"204bmp\" color=\"5\" fill=\"10\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"205\" name=\"205bmp\" color=\"6\" fill=\"10\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"206\" name=\"206bmp\" color=\"7\" fill=\"10\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"207\" name=\"207bmp\" color=\"8\" fill=\"10\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"208\" name=\"208bmp\" color=\"9\" fill=\"10\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"209\" name=\"209bmp\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"210\" name=\"210bmp\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"211\" name=\"211bmp\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"212\" name=\"212bmp\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"213\" name=\"213bmp\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"214\" name=\"214bmp\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"215\" name=\"215bmp\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"216\" name=\"216bmp\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"217\" name=\"217bmp\" color=\"18\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"218\" name=\"218bmp\" color=\"19\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"219\" name=\"219bmp\" color=\"20\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"220\" name=\"220bmp\" color=\"21\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"221\" name=\"221bmp\" color=\"22\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"222\" name=\"222bmp\" color=\"23\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"223\" name=\"223bmp\" color=\"24\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"224\" name=\"224bmp\" color=\"25\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"225\" name=\"225bmp\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"226\" name=\"226bmp\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"227\" name=\"227bmp\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"228\" name=\"228bmp\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"229\" name=\"229bmp\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"230\" name=\"230bmp\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"231\" name=\"231bmp\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"248\" name=\"Housing\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"249\" name=\"Edge\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"250\" name=\"Descript\" color=\"3\" fill=\"1\" visible=\"no\" active=\"no\"/>\n<layer number=\"251\" name=\"SMDround\" color=\"12\" fill=\"11\" visible=\"no\" active=\"no\"/>\n<layer number=\"254\" name=\"cooling\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n<layer number=\"255\" name=\"routoute\" color=\"7\" fill=\"1\" visible=\"yes\" active=\"yes\"/>\n</layers>\n<schematic xreflabel=\"%F%N/%S.%C%R\" xrefpart=\"/%S.%C%R\">\n<libraries>\n<library name=\"battery\">\n<description>&lt;b&gt;Lithium Batteries and NC Accus&lt;/b&gt;&lt;p&gt;\n&lt;author&gt;Created by librarian@cadsoft.de&lt;/author&gt;</description>\n<packages>\n<package name=\"CRAA\">\n<description>&lt;b&gt;LI BATTERY&lt;/b&gt; Varta</description>\n<wire x1=\"23.622\" y1=\"-7.493\" x2=\"-25.146\" y2=\"-7.493\" width=\"0.1524\" layer=\"21\"/>\n<wire x1=\"-25.146\" y1=\"6.985\" x2=\"-25.146\" y2=\"7.493\" width=\"0.1524\" layer=\"21\"/>\n<wire x1=\"-25.4\" y1=\"-3.175\" x2=\"-25.4\" y2=\"3.175\" width=\"0.4064\" layer=\"21\"/>\n<wire x1=\"-25.146\" y1=\"-7.493\" x2=\"-25.146\" y2=\"-6.985\" width=\"0.1524\" layer=\"21\"/>\n<wire x1=\"25.4\" y1=\"-2.413\" x2=\"25.4\" y2=\"2.413\" width=\"0.4064\" layer=\"51\"/>\n<wire x1=\"-25.4\" y1=\"-6.985\" x2=\"-25.4\" y2=\"-3.175\" width=\"0.1524\" layer=\"51\"/>\n<wire x1=\"-25.4\" y1=\"3.175\" x2=\"-25.4\" y2=\"6.985\" width=\"0.4064\" layer=\"51\"/>\n<wire x1=\"25.146\" y1=\"1.778\" x2=\"25.146\" y2=\"3.556\" width=\"0.1524\" layer=\"21\"/>\n<wire x1=\"25.146\" y1=\"-3.556\" x2=\"25.146\" y2=\"-1.778\" width=\"0.1524\" layer=\"21\"/>\n<wire x1=\"25.146\" y1=\"3.556\" x2=\"24.257\" y2=\"3.556\" width=\"0.1524\" layer=\"21\"/>\n<wire x1=\"24.257\" y1=\"3.556\" x2=\"24.257\" y2=\"6.858\" width=\"0.1524\" layer=\"21\"/>\n<wire x1=\"25.146\" y1=\"-3.556\" x2=\"24.257\" y2=\"-3.556\" width=\"0.1524\" layer=\"21\"/>\n<wire x1=\"24.257\" y1=\"-3.556\" x2=\"24.257\" y2=\"-1.27\" width=\"0.1524\" layer=\"21\"/>\n<wire x1=\"24.257\" y1=\"-1.27\" x2=\"24.257\" y2=\"1.27\" width=\"0.1524\" layer=\"51\"/>\n<wire x1=\"24.257\" y1=\"1.27\" x2=\"24.257\" y2=\"3.556\" width=\"0.1524\" layer=\"21\"/>\n<wire x1=\"-24.384\" y1=\"0\" x2=\"-22.86\" y2=\"0\" width=\"0.254\" layer=\"21\"/>\n<wire x1=\"-23.622\" y1=\"-0.762\" x2=\"-23.622\" y2=\"0.762\" width=\"0.254\" layer=\"21\"/>\n<wire x1=\"20.447\" y1=\"0\" x2=\"21.971\" y2=\"0\" width=\"0.1524\" layer=\"21\"/>\n<wire x1=\"23.622\" y1=\"-7.493\" x2=\"24.257\" y2=\"-6.858\" width=\"0.1524\" layer=\"21\" curve=\"90\"/>\n<wire x1=\"23.622\" y1=\"7.493\" x2=\"24.257\" y2=\"6.858\" width=\"0.1524\" layer=\"21\" curve=\"-90\"/>\n<wire x1=\"24.257\" y1=\"-6.858\" x2=\"24.257\" y2=\"-3.556\" width=\"0.1524\" layer=\"21\"/>\n<wire x1=\"23.622\" y1=\"7.493\" x2=\"-25.146\" y2=\"7.493\" width=\"0.1524\" layer=\"21\"/>\n<wire x1=\"-2.921\" y1=\"-2.54\" x2=\"-2.921\" y2=\"0\" width=\"0.254\" layer=\"21\"/>\n<wire x1=\"0.254\" y1=\"0\" x2=\"-1.651\" y2=\"0\" width=\"0.1524\" layer=\"21\"/>\n<wire x1=\"-2.921\" y1=\"0\" x2=\"-5.207\" y2=\"0\" width=\"0.1524\" layer=\"21\"/>\n<wire x1=\"-2.921\" y1=\"0\" x2=\"-2.921\" y2=\"2.54\" width=\"0.254\" layer=\"21\"/>\n<wire x1=\"-3.429\" y1=\"-1.524\" x2=\"-4.445\" y2=\"-1.524\" width=\"0.1524\" layer=\"21\"/>\n<wire x1=\"-3.937\" y1=\"-2.032\" x2=\"-3.937\" y2=\"-1.016\" width=\"0.1524\" layer=\"21\"/>\n<pad name=\"+\" x=\"-25.4\" y=\"-5.08\" drill=\"1.3208\" diameter=\"3.1496\" shape=\"octagon\"/>\n<pad name=\"+@1\" x=\"-25.4\" y=\"5.08\" drill=\"1.3208\" diameter=\"3.1496\" shape=\"octagon\"/>\n<pad name=\"-\" x=\"25.4\" y=\"0\" drill=\"1.3208\" diameter=\"3.1496\" shape=\"octagon\"/>\n<text x=\"-25.4\" y=\"8.255\" size=\"1.27\" layer=\"25\" ratio=\"10\">&gt;NAME</text>\n<text x=\"-10.16\" y=\"-5.08\" size=\"1.27\" layer=\"21\" ratio=\"10\">Lithium 3V</text>\n<text x=\"17.018\" y=\"-6.731\" size=\"1.27\" layer=\"21\" ratio=\"10\">CR-AA</text>\n<text x=\"-7.62\" y=\"3.81\" size=\"1.27\" layer=\"27\" ratio=\"10\">&gt;VALUE</text>\n<rectangle x1=\"-2.286\" y1=\"-1.27\" x2=\"-1.651\" y2=\"1.27\" layer=\"21\"/>\n</package>\n</packages>\n<symbols>\n<symbol name=\"1V2+2\">\n<wire x1=\"-1.905\" y1=\"0.635\" x2=\"-1.905\" y2=\"0\" width=\"0.4064\" layer=\"94\"/>\n<wire x1=\"-2.54\" y1=\"0\" x2=\"-1.905\" y2=\"0\" width=\"0.1524\" layer=\"94\"/>\n<wire x1=\"-1.905\" y1=\"0\" x2=\"-1.905\" y2=\"-0.635\" width=\"0.4064\" layer=\"94\"/>\n<wire x1=\"-0.635\" y1=\"2.54\" x2=\"-0.635\" y2=\"0\" width=\"0.4064\" layer=\"94\"/>\n<wire x1=\"-0.635\" y1=\"0\" x2=\"2.54\" y2=\"0\" width=\"0.1524\" layer=\"94\"/>\n<wire x1=\"-0.635\" y1=\"0\" x2=\"-0.635\" y2=\"-2.54\" width=\"0.4064\" layer=\"94\"/>\n<text x=\"-2.54\" y=\"3.175\" size=\"1.778\" layer=\"95\">&gt;NAME</text>\n<text x=\"-2.54\" y=\"-5.08\" size=\"1.778\" layer=\"96\">&gt;VALUE</text>\n<pin name=\"+\" x=\"5.08\" y=\"0\" visible=\"pad\" length=\"short\" direction=\"pas\" rot=\"R180\"/>\n<pin name=\"-\" x=\"-5.08\" y=\"0\" visible=\"pad\" length=\"short\" direction=\"pas\"/>\n<pin name=\"+@1\" x=\"2.54\" y=\"0\" visible=\"off\" length=\"point\" direction=\"pas\" rot=\"R180\"/>\n</symbol>\n</symbols>\n<devicesets>\n<deviceset name=\"CRAA\" prefix=\"G\">\n<description>&lt;b&gt;LI BATTERY&lt;/b&gt; Varta</description>\n<gates>\n<gate name=\"G$1\" symbol=\"1V2+2\" x=\"0\" y=\"0\"/>\n</gates>\n<devices>\n<device name=\"\" package=\"CRAA\">\n<connects>\n<connect gate=\"G$1\" pin=\"+\" pad=\"+\"/>\n<connect gate=\"G$1\" pin=\"+@1\" pad=\"+@1\"/>\n<connect gate=\"G$1\" pin=\"-\" pad=\"-\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n</devices>\n</deviceset>\n</devicesets>\n</library>\n<library name=\"supply1\">\n<description>&lt;b&gt;Supply Symbols&lt;/b&gt;&lt;p&gt;\n GND, VCC, 0V, +5V, -5V, etc.&lt;p&gt;\n Please keep in mind, that these devices are necessary for the\n automatic wiring of the supply signals.&lt;p&gt;\n The pin name defined in the symbol is identical to the net which is to be wired automatically.&lt;p&gt;\n In this library the device names are the same as the pin names of the symbols, therefore the correct signal names appear next to the supply symbols in the schematic.&lt;p&gt;\n &lt;author&gt;Created by librarian@cadsoft.de&lt;/author&gt;</description>\n<packages>\n</packages>\n<symbols>\n<symbol name=\"+12V\">\n<wire x1=\"1.27\" y1=\"-1.905\" x2=\"0\" y2=\"0\" width=\"0.254\" layer=\"94\"/>\n<wire x1=\"0\" y1=\"0\" x2=\"-1.27\" y2=\"-1.905\" width=\"0.254\" layer=\"94\"/>\n<wire x1=\"1.27\" y1=\"-0.635\" x2=\"0\" y2=\"1.27\" width=\"0.254\" layer=\"94\"/>\n<wire x1=\"0\" y1=\"1.27\" x2=\"-1.27\" y2=\"-0.635\" width=\"0.254\" layer=\"94\"/>\n<text x=\"-2.54\" y=\"-5.08\" size=\"1.778\" layer=\"96\" rot=\"R90\">&gt;VALUE</text>\n<pin name=\"+12V\" x=\"0\" y=\"-2.54\" visible=\"off\" length=\"short\" direction=\"sup\" rot=\"R90\"/>\n</symbol>\n<symbol name=\"+3V3\">\n<wire x1=\"1.27\" y1=\"-1.905\" x2=\"0\" y2=\"0\" width=\"0.254\" layer=\"94\"/>\n<wire x1=\"0\" y1=\"0\" x2=\"-1.27\" y2=\"-1.905\" width=\"0.254\" layer=\"94\"/>\n<text x=\"-2.54\" y=\"-5.08\" size=\"1.778\" layer=\"96\" rot=\"R90\">&gt;VALUE</text>\n<pin name=\"+3V3\" x=\"0\" y=\"-2.54\" visible=\"off\" length=\"short\" direction=\"sup\" rot=\"R90\"/>\n</symbol>\n<symbol name=\"GND\">\n<wire x1=\"-1.905\" y1=\"0\" x2=\"1.905\" y2=\"0\" width=\"0.254\" layer=\"94\"/>\n<text x=\"-2.54\" y=\"-2.54\" size=\"1.778\" layer=\"96\">&gt;VALUE</text>\n<pin name=\"GND\" x=\"0\" y=\"2.54\" visible=\"off\" length=\"short\" direction=\"sup\" rot=\"R270\"/>\n</symbol>\n</symbols>\n<devicesets>\n<deviceset name=\"+12V\" prefix=\"P+\">\n<description>&lt;b&gt;SUPPLY SYMBOL&lt;/b&gt;</description>\n<gates>\n<gate name=\"1\" symbol=\"+12V\" x=\"0\" y=\"0\"/>\n</gates>\n<devices>\n<device name=\"\">\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n</devices>\n</deviceset>\n<deviceset name=\"+3V3\" prefix=\"+3V3\">\n<description>&lt;b&gt;SUPPLY SYMBOL&lt;/b&gt;</description>\n<gates>\n<gate name=\"G$1\" symbol=\"+3V3\" x=\"0\" y=\"0\"/>\n</gates>\n<devices>\n<device name=\"\">\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n</devices>\n</deviceset>\n<deviceset name=\"GND\" prefix=\"GND\">\n<description>&lt;b&gt;SUPPLY SYMBOL&lt;/b&gt;</description>\n<gates>\n<gate name=\"1\" symbol=\"GND\" x=\"0\" y=\"0\"/>\n</gates>\n<devices>\n<device name=\"\">\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n</devices>\n</deviceset>\n</devicesets>\n</library>\n<library name=\"RF_Digital_RFD22102_Eagle_Schematic_PCB_Library\">\n<packages>\n<package name=\"RFD22102\">\n<pad name=\"GPIO0\" x=\"-10.16\" y=\"-10.16\" drill=\"1.016\"/>\n<pad name=\"GPIO3\" x=\"10.16\" y=\"-10.16\" drill=\"1.016\"/>\n<pad name=\"GND\" x=\"-10.16\" y=\"2.54\" drill=\"1.016\"/>\n<pad name=\"GPIO1\" x=\"-10.16\" y=\"-12.7\" drill=\"1.016\"/>\n<pad name=\"GPIO2\" x=\"10.16\" y=\"-12.7\" drill=\"1.016\"/>\n<pad name=\"GPIO6\" x=\"10.16\" y=\"-2.54\" drill=\"1.016\"/>\n<pad name=\"GPIO4\" x=\"10.16\" y=\"-7.62\" drill=\"1.016\"/>\n<pad name=\"GPIO5\" x=\"10.16\" y=\"-5.08\" drill=\"1.016\"/>\n<pad name=\"FACTORY\" x=\"-10.16\" y=\"-7.62\" drill=\"1.016\"/>\n<pad name=\"RESET\" x=\"-10.16\" y=\"-5.08\" drill=\"1.016\"/>\n<pad name=\"VCC\" x=\"-10.16\" y=\"-2.54\" drill=\"1.016\"/>\n<pad name=\"EXT_ANT\" x=\"-10.16\" y=\"0\" drill=\"1.016\"/>\n<wire x1=\"-11.43\" y1=\"-14.478\" x2=\"11.43\" y2=\"-14.478\" width=\"0.4064\" layer=\"51\"/>\n<wire x1=\"-11.43\" y1=\"-14.478\" x2=\"-11.43\" y2=\"14.478\" width=\"0.4064\" layer=\"51\"/>\n<wire x1=\"-11.43\" y1=\"14.478\" x2=\"11.43\" y2=\"14.478\" width=\"0.4064\" layer=\"51\"/>\n<wire x1=\"11.43\" y1=\"14.478\" x2=\"11.43\" y2=\"-14.478\" width=\"0.4064\" layer=\"51\"/>\n<text x=\"-2.54\" y=\"10.16\" size=\"1.778\" layer=\"51\">ANT AREA</text>\n<text x=\"-11.43\" y=\"17.78\" size=\"1.778\" layer=\"25\">&gt;NAME</text>\n<text x=\"-10.922\" y=\"-17.526\" size=\"1.778\" layer=\"27\">&gt;VALUE</text>\n</package>\n</packages>\n<symbols>\n<symbol name=\"RFD22102\">\n<description>&lt;b&gt;RFD22102&lt;/b&gt;\n&lt;p&gt; RFduino DIP Module &lt;/p&gt;\nRFduino Datasheet:&lt;br&gt;\nhttp://www.rfdigital.com/wp-content/uploads/2014/03/rfduino.datasheet.pdf</description>\n<wire x1=\"-12.7\" y1=\"12.7\" x2=\"-12.7\" y2=\"-12.7\" width=\"0.4064\" layer=\"94\"/>\n<wire x1=\"-12.7\" y1=\"-12.7\" x2=\"12.7\" y2=\"-12.7\" width=\"0.4064\" layer=\"94\"/>\n<wire x1=\"12.7\" y1=\"-12.7\" x2=\"12.7\" y2=\"12.7\" width=\"0.4064\" layer=\"94\"/>\n<wire x1=\"12.7\" y1=\"12.7\" x2=\"-12.7\" y2=\"12.7\" width=\"0.4064\" layer=\"94\"/>\n<pin name=\"GND\" x=\"-15.24\" y=\"7.62\" visible=\"pin\" length=\"short\" direction=\"pwr\"/>\n<pin name=\"EXT_ANT\" x=\"-15.24\" y=\"5.08\" visible=\"pin\" length=\"short\" direction=\"nc\"/>\n<pin name=\"VCC\" x=\"-15.24\" y=\"2.54\" visible=\"pin\" length=\"short\" direction=\"pwr\"/>\n<pin name=\"RESET\" x=\"-15.24\" y=\"0\" visible=\"pin\" length=\"short\"/>\n<pin name=\"FACTORY\" x=\"-15.24\" y=\"-2.54\" visible=\"pin\" length=\"short\"/>\n<pin name=\"GPIO0\" x=\"-15.24\" y=\"-5.08\" visible=\"pin\" length=\"short\"/>\n<pin name=\"GPIO1\" x=\"-15.24\" y=\"-7.62\" visible=\"pin\" length=\"short\"/>\n<pin name=\"GPIO2\" x=\"15.24\" y=\"-7.62\" visible=\"pin\" length=\"short\" rot=\"R180\"/>\n<pin name=\"GPIO3\" x=\"15.24\" y=\"-5.08\" visible=\"pin\" length=\"short\" rot=\"R180\"/>\n<pin name=\"GPIO4\" x=\"15.24\" y=\"-2.54\" visible=\"pin\" length=\"short\" rot=\"R180\"/>\n<pin name=\"GPIO5\" x=\"15.24\" y=\"0\" visible=\"pin\" length=\"short\" rot=\"R180\"/>\n<pin name=\"GPIO6\" x=\"15.24\" y=\"2.54\" visible=\"pin\" length=\"short\" rot=\"R180\"/>\n<text x=\"-10.16\" y=\"13.97\" size=\"1.778\" layer=\"95\">&gt;NAME</text>\n<text x=\"-10.16\" y=\"-15.24\" size=\"1.778\" layer=\"96\">&gt;VALUE</text>\n</symbol>\n</symbols>\n<devicesets>\n<deviceset name=\"RFD22102\" prefix=\"U\">\n<description>&lt;b&gt;RFD22102&lt;/b&gt;\n\n&lt;p&gt; RFduino DIP module &lt;/p&gt;\nRFduino Datasheet: &lt;br&gt;\nhttp://www.rfdigital.com/wp-content/uploads/2014/03/rfduino.datasheet.pdf</description>\n<gates>\n<gate name=\"G$1\" symbol=\"RFD22102\" x=\"0\" y=\"0\"/>\n</gates>\n<devices>\n<device name=\"\" package=\"RFD22102\">\n<connects>\n<connect gate=\"G$1\" pin=\"EXT_ANT\" pad=\"EXT_ANT\"/>\n<connect gate=\"G$1\" pin=\"FACTORY\" pad=\"FACTORY\"/>\n<connect gate=\"G$1\" pin=\"GND\" pad=\"GND\"/>\n<connect gate=\"G$1\" pin=\"GPIO0\" pad=\"GPIO0\"/>\n<connect gate=\"G$1\" pin=\"GPIO1\" pad=\"GPIO1\"/>\n<connect gate=\"G$1\" pin=\"GPIO2\" pad=\"GPIO2\"/>\n<connect gate=\"G$1\" pin=\"GPIO3\" pad=\"GPIO3\"/>\n<connect gate=\"G$1\" pin=\"GPIO4\" pad=\"GPIO4\"/>\n<connect gate=\"G$1\" pin=\"GPIO5\" pad=\"GPIO5\"/>\n<connect gate=\"G$1\" pin=\"GPIO6\" pad=\"GPIO6\"/>\n<connect gate=\"G$1\" pin=\"RESET\" pad=\"RESET\"/>\n<connect gate=\"G$1\" pin=\"VCC\" pad=\"VCC\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n</devices>\n</deviceset>\n</devicesets>\n</library>\n<library name=\"SparkFun-Electromechanical\">\n<description>&lt;h3&gt;SparkFun Electronics' preferred foot prints&lt;/h3&gt;\nIn this library you'll find anything that moves- switches, relays, buttons, potentiometers. Also, anything that goes on a board but isn't electrical in nature- screws, standoffs, etc.&lt;br&gt;&lt;br&gt;\nWe've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com.\n&lt;br&gt;&lt;br&gt;\n&lt;b&gt;Licensing:&lt;/b&gt; Creative Commons ShareAlike 4.0 International - https://creativecommons.org/licenses/by-sa/4.0/ \n&lt;br&gt;&lt;br&gt;\nYou are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage.</description>\n<packages>\n<package name=\"SWITCH-SPDT\">\n<wire x1=\"2.175\" y1=\"5.815\" x2=\"-2.175\" y2=\"5.815\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-2.175\" y1=\"5.815\" x2=\"-2.175\" y2=\"-5.815\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-2.175\" y1=\"-5.815\" x2=\"2.175\" y2=\"-5.815\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"2.175\" y1=\"-5.815\" x2=\"2.175\" y2=\"5.815\" width=\"0.2032\" layer=\"21\"/>\n<pad name=\"1\" x=\"0\" y=\"2.54\" drill=\"1.016\" diameter=\"1.8796\"/>\n<pad name=\"2\" x=\"0\" y=\"0\" drill=\"1.016\" diameter=\"1.8796\"/>\n<pad name=\"3\" x=\"0\" y=\"-2.54\" drill=\"1.016\" diameter=\"1.8796\"/>\n<text x=\"-3.81\" y=\"7.62\" size=\"1.778\" layer=\"25\" ratio=\"10\">&gt;NAME</text>\n<text x=\"-3.81\" y=\"-9.525\" size=\"1.778\" layer=\"27\" ratio=\"10\">&gt;VALUE</text>\n</package>\n<package name=\"AYZ0202\">\n<description>&lt;b&gt;DPDT Slide Switch SMD&lt;/b&gt;\nwww.SparkFun.com SKU : Comp-SMDS</description>\n<wire x1=\"-3.6\" y1=\"1.75\" x2=\"-3.6\" y2=\"-1.75\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-3.6\" y1=\"-1.75\" x2=\"3.6\" y2=\"-1.75\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"3.6\" y1=\"-1.75\" x2=\"3.6\" y2=\"1.75\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"3.6\" y1=\"1.75\" x2=\"-3.6\" y2=\"1.75\" width=\"0.2032\" layer=\"21\"/>\n<smd name=\"3\" x=\"2.5\" y=\"2.825\" dx=\"1\" dy=\"1.15\" layer=\"1\"/>\n<smd name=\"2\" x=\"0\" y=\"2.825\" dx=\"1\" dy=\"1.15\" layer=\"1\"/>\n<smd name=\"1\" x=\"-2.5\" y=\"2.825\" dx=\"1\" dy=\"1.15\" layer=\"1\"/>\n<smd name=\"6\" x=\"2.5\" y=\"-2.825\" dx=\"1\" dy=\"1.15\" layer=\"1\"/>\n<smd name=\"5\" x=\"0\" y=\"-2.825\" dx=\"1\" dy=\"1.15\" layer=\"1\"/>\n<smd name=\"4\" x=\"-2.5\" y=\"-2.825\" dx=\"1\" dy=\"1.15\" layer=\"1\"/>\n<text x=\"-2.54\" y=\"1.143\" size=\"0.4064\" layer=\"25\">&gt;Name</text>\n<text x=\"0.508\" y=\"1.143\" size=\"0.4064\" layer=\"27\">&gt;Value</text>\n<hole x=\"1.5\" y=\"0\" drill=\"0.85\"/>\n<hole x=\"-1.5\" y=\"0\" drill=\"0.85\"/>\n</package>\n<package name=\"SWITCHE-DPDT\">\n<wire x1=\"8\" y1=\"3.25\" x2=\"-8\" y2=\"3.25\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"-8\" y1=\"3.25\" x2=\"-8\" y2=\"-3.25\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"-8\" y1=\"-3.25\" x2=\"8\" y2=\"-3.25\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"8\" y1=\"-3.25\" x2=\"8\" y2=\"3.25\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"-6\" y1=\"3.25\" x2=\"6\" y2=\"3.25\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"8\" y1=\"1\" x2=\"8\" y2=\"-1\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"6\" y1=\"-3.25\" x2=\"-6\" y2=\"-3.25\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-8\" y1=\"-1\" x2=\"-8\" y2=\"1\" width=\"0.2032\" layer=\"21\"/>\n<pad name=\"P$1\" x=\"-7.5\" y=\"3\" drill=\"1.5\" diameter=\"2.54\"/>\n<pad name=\"P$2\" x=\"-7.5\" y=\"-3\" drill=\"1.5\" diameter=\"2.54\"/>\n<pad name=\"P$3\" x=\"7.5\" y=\"3\" drill=\"1.5\" diameter=\"2.54\"/>\n<pad name=\"P$4\" x=\"7.5\" y=\"-3\" drill=\"1.5\" diameter=\"2.54\"/>\n<pad name=\"1\" x=\"-4\" y=\"1.25\" drill=\"0.7\" diameter=\"1.6764\"/>\n<pad name=\"2\" x=\"0\" y=\"1.25\" drill=\"0.7\" diameter=\"1.6764\"/>\n<pad name=\"3\" x=\"4\" y=\"1.25\" drill=\"0.7\" diameter=\"1.6764\"/>\n<pad name=\"4\" x=\"-4\" y=\"-1.25\" drill=\"0.7\" diameter=\"1.6764\"/>\n<pad name=\"5\" x=\"0\" y=\"-1.25\" drill=\"0.7\" diameter=\"1.6764\"/>\n<pad name=\"6\" x=\"4\" y=\"-1.25\" drill=\"0.7\" diameter=\"1.6764\"/>\n</package>\n<package name=\"R_SW_TH\">\n<wire x1=\"-1.651\" y1=\"19.2532\" x2=\"-1.651\" y2=\"-1.3716\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-1.651\" y1=\"-1.3716\" x2=\"-1.651\" y2=\"-2.2352\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-1.651\" y1=\"19.2532\" x2=\"13.589\" y2=\"19.2532\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"13.589\" y1=\"19.2532\" x2=\"13.589\" y2=\"-2.2352\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"13.589\" y1=\"-2.2352\" x2=\"-1.651\" y2=\"-2.2352\" width=\"0.2032\" layer=\"21\"/>\n<pad name=\"P$1\" x=\"0\" y=\"0\" drill=\"1.6002\"/>\n<pad name=\"P$2\" x=\"0\" y=\"16.9926\" drill=\"1.6002\"/>\n<pad name=\"P$3\" x=\"12.0904\" y=\"15.494\" drill=\"1.6002\"/>\n<pad name=\"P$4\" x=\"12.0904\" y=\"8.4582\" drill=\"1.6002\"/>\n</package>\n<package name=\"SWITCH-SPDT-SMD\">\n<wire x1=\"-4.5\" y1=\"1.75\" x2=\"-4.5\" y2=\"-1.75\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"-4.5\" y1=\"-1.75\" x2=\"4.5\" y2=\"-1.75\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"4.5\" y1=\"-1.75\" x2=\"4.5\" y2=\"1.75\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"4.5\" y1=\"1.75\" x2=\"2\" y2=\"1.75\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"2\" y1=\"1.75\" x2=\"0.5\" y2=\"1.75\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"0.5\" y1=\"1.75\" x2=\"-4.5\" y2=\"1.75\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"0.5\" y1=\"1.75\" x2=\"0.5\" y2=\"3.75\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"0.5\" y1=\"3.75\" x2=\"2\" y2=\"3.75\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"2\" y1=\"3.75\" x2=\"2\" y2=\"1.75\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"-4\" y1=\"-1.75\" x2=\"-4.5\" y2=\"-1.75\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-4.5\" y1=\"-1.75\" x2=\"-4.5\" y2=\"1.75\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-4.5\" y1=\"1.75\" x2=\"4.5\" y2=\"1.75\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"4.5\" y1=\"1.75\" x2=\"4.5\" y2=\"-1.75\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"4.5\" y1=\"-1.75\" x2=\"4\" y2=\"-1.75\" width=\"0.2032\" layer=\"21\"/>\n<smd name=\"1\" x=\"-2.5\" y=\"-2.75\" dx=\"1.2\" dy=\"2.5\" layer=\"1\" rot=\"R180\"/>\n<smd name=\"2\" x=\"0\" y=\"-2.75\" dx=\"1.2\" dy=\"2.5\" layer=\"1\" rot=\"R180\"/>\n<smd name=\"3\" x=\"2.5\" y=\"-2.75\" dx=\"1.2\" dy=\"2.5\" layer=\"1\" rot=\"R180\"/>\n<text x=\"-1.27\" y=\"0.635\" size=\"0.6096\" layer=\"25\">&gt;Name</text>\n<text x=\"-1.27\" y=\"-1.27\" size=\"0.6096\" layer=\"27\">&gt;Value</text>\n<hole x=\"-3.55\" y=\"0\" drill=\"0.9\"/>\n<hole x=\"3.55\" y=\"0\" drill=\"0.9\"/>\n</package>\n<package name=\"SWITCH-SPDT_LOCK.007S\">\n<wire x1=\"2.175\" y1=\"5.815\" x2=\"-2.175\" y2=\"5.815\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-2.175\" y1=\"5.815\" x2=\"-2.175\" y2=\"-5.815\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-2.175\" y1=\"-5.815\" x2=\"2.175\" y2=\"-5.815\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"2.175\" y1=\"-5.815\" x2=\"2.175\" y2=\"5.815\" width=\"0.2032\" layer=\"21\"/>\n<pad name=\"1\" x=\"0\" y=\"2.7178\" drill=\"1.016\" diameter=\"1.8796\"/>\n<pad name=\"2\" x=\"0\" y=\"0\" drill=\"1.016\" diameter=\"1.8796\"/>\n<pad name=\"3\" x=\"0\" y=\"-2.7178\" drill=\"1.016\" diameter=\"1.8796\"/>\n<text x=\"-3.81\" y=\"7.62\" size=\"1.778\" layer=\"25\" ratio=\"10\">&gt;NAME</text>\n<text x=\"-3.81\" y=\"-9.525\" size=\"1.778\" layer=\"27\" ratio=\"10\">&gt;VALUE</text>\n<rectangle x1=\"-0.2286\" y1=\"-0.3048\" x2=\"0.2286\" y2=\"0.3048\" layer=\"51\"/>\n<rectangle x1=\"-0.2286\" y1=\"2.2352\" x2=\"0.2286\" y2=\"2.8448\" layer=\"51\"/>\n<rectangle x1=\"-0.2286\" y1=\"-2.8448\" x2=\"0.2286\" y2=\"-2.2352\" layer=\"51\"/>\n</package>\n<package name=\"SWITCH-SPDT_KIT\">\n<description>&lt;h3&gt;SWITCH-SPDT_KIT&lt;/h3&gt;\nThrough-hole SPDT Switch&lt;br&gt;\n&lt;br&gt;\n&lt;b&gt;Warning:&lt;/b&gt; This is the KIT version of this package. This package has a smaller diameter top stop mask, which doesn't cover the diameter of the pad. This means only the bottom side of the pads' copper will be exposed. You'll only be able to solder to the bottom side.</description>\n<wire x1=\"2.175\" y1=\"5.815\" x2=\"-2.175\" y2=\"5.815\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-2.175\" y1=\"5.815\" x2=\"-2.175\" y2=\"-5.815\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-2.175\" y1=\"-5.815\" x2=\"2.175\" y2=\"-5.815\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"2.175\" y1=\"-5.815\" x2=\"2.175\" y2=\"5.815\" width=\"0.2032\" layer=\"21\"/>\n<pad name=\"1\" x=\"0\" y=\"2.7178\" drill=\"1.016\" diameter=\"1.8796\" stop=\"no\"/>\n<pad name=\"2\" x=\"0\" y=\"0\" drill=\"1.016\" diameter=\"1.8796\" stop=\"no\"/>\n<pad name=\"3\" x=\"0\" y=\"-2.7178\" drill=\"1.016\" diameter=\"1.8796\" stop=\"no\"/>\n<text x=\"-3.81\" y=\"7.62\" size=\"1.778\" layer=\"25\" ratio=\"10\">&gt;NAME</text>\n<text x=\"-3.81\" y=\"-9.525\" size=\"1.778\" layer=\"27\" ratio=\"10\">&gt;VALUE</text>\n<rectangle x1=\"-0.2286\" y1=\"-0.3048\" x2=\"0.2286\" y2=\"0.3048\" layer=\"51\"/>\n<rectangle x1=\"-0.2286\" y1=\"2.2352\" x2=\"0.2286\" y2=\"2.8448\" layer=\"51\"/>\n<rectangle x1=\"-0.2286\" y1=\"-2.8448\" x2=\"0.2286\" y2=\"-2.2352\" layer=\"51\"/>\n<polygon width=\"0.127\" layer=\"30\">\n<vertex x=\"-0.0178\" y=\"1.8414\" curve=\"-90.039946\"/>\n<vertex x=\"-0.8787\" y=\"2.6975\" curve=\"-90\"/>\n<vertex x=\"-0.0026\" y=\"3.5916\" curve=\"-90.006409\"/>\n<vertex x=\"0.8738\" y=\"2.6975\" curve=\"-90.03214\"/>\n</polygon>\n<polygon width=\"0.127\" layer=\"30\">\n<vertex x=\"-0.0051\" y=\"-3.5967\" curve=\"-90.006558\"/>\n<vertex x=\"-0.8788\" y=\"-2.7431\" curve=\"-90.037923\"/>\n<vertex x=\"0.0128\" y=\"-1.8363\" curve=\"-90.006318\"/>\n<vertex x=\"0.8814\" y=\"-2.7432\" curve=\"-90.038792\"/>\n</polygon>\n<polygon width=\"0.127\" layer=\"30\">\n<vertex x=\"-0.0102\" y=\"-0.8738\" curve=\"-90.019852\"/>\n<vertex x=\"-0.8762\" y=\"-0.0203\" curve=\"-90.019119\"/>\n<vertex x=\"0.0153\" y=\"0.8789\" curve=\"-90\"/>\n<vertex x=\"0.8739\" y=\"-0.0077\" curve=\"-90.038897\"/>\n</polygon>\n<polygon width=\"0.127\" layer=\"29\">\n<vertex x=\"0\" y=\"2.2758\" curve=\"-90.012891\"/>\n<vertex x=\"-0.4445\" y=\"2.7\" curve=\"-90\"/>\n<vertex x=\"0\" y=\"3.1673\" curve=\"-90\"/>\n<vertex x=\"0.4419\" y=\"2.7102\" curve=\"-90.012967\"/>\n</polygon>\n<polygon width=\"0.127\" layer=\"29\">\n<vertex x=\"0.0026\" y=\"-3.1648\" curve=\"-90.012891\"/>\n<vertex x=\"-0.4419\" y=\"-2.7406\" curve=\"-90\"/>\n<vertex x=\"0.0026\" y=\"-2.2733\" curve=\"-90\"/>\n<vertex x=\"0.4445\" y=\"-2.7304\" curve=\"-90.012967\"/>\n</polygon>\n<polygon width=\"0.127\" layer=\"29\">\n<vertex x=\"0.0102\" y=\"-0.4471\" curve=\"-90.012891\"/>\n<vertex x=\"-0.4343\" y=\"-0.0229\" curve=\"-90\"/>\n<vertex x=\"0.0102\" y=\"0.4444\" curve=\"-90\"/>\n<vertex x=\"0.4521\" y=\"-0.0127\" curve=\"-90.012967\"/>\n</polygon>\n</package>\n<package name=\"SWITCH-SPST-SMD-A\">\n<wire x1=\"-3.35\" y1=\"1.3\" x2=\"-3.35\" y2=\"-1.3\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"-3.35\" y1=\"-1.3\" x2=\"3.35\" y2=\"-1.3\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"3.35\" y1=\"-1.3\" x2=\"3.35\" y2=\"1.3\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"3.35\" y1=\"1.3\" x2=\"-0.1\" y2=\"1.3\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"-0.1\" y1=\"1.3\" x2=\"-1.4\" y2=\"1.3\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"-1.4\" y1=\"1.3\" x2=\"-3.35\" y2=\"1.3\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"-0.1\" y1=\"1.3\" x2=\"-0.1\" y2=\"2.8\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"-0.1\" y1=\"2.8\" x2=\"-1.4\" y2=\"2.8\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"-1.4\" y1=\"2.8\" x2=\"-1.4\" y2=\"1.3\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"-3.35\" y1=\"0.3\" x2=\"-3.35\" y2=\"-0.3\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"3.35\" y1=\"0.3\" x2=\"3.35\" y2=\"-0.3\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"2.7\" y1=\"1.3\" x2=\"-2.7\" y2=\"1.3\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"1.5\" y1=\"-1.3\" x2=\"0\" y2=\"-1.3\" width=\"0.2032\" layer=\"21\"/>\n<smd name=\"1\" x=\"-2.25\" y=\"-1.75\" dx=\"0.7\" dy=\"1.5\" layer=\"1\" rot=\"R180\"/>\n<smd name=\"2\" x=\"-0.75\" y=\"-1.75\" dx=\"0.7\" dy=\"1.5\" layer=\"1\" rot=\"R180\"/>\n<smd name=\"3\" x=\"2.25\" y=\"-1.75\" dx=\"0.7\" dy=\"1.5\" layer=\"1\" rot=\"R180\"/>\n<smd name=\"GND1\" x=\"-3.65\" y=\"1\" dx=\"1\" dy=\"0.6\" layer=\"1\"/>\n<smd name=\"GND2\" x=\"-3.65\" y=\"-1.1\" dx=\"1\" dy=\"0.8\" layer=\"1\"/>\n<smd name=\"GND3\" x=\"3.65\" y=\"1\" dx=\"1\" dy=\"0.6\" layer=\"1\"/>\n<smd name=\"GND4\" x=\"3.65\" y=\"-1.1\" dx=\"1\" dy=\"0.8\" layer=\"1\"/>\n<text x=\"-1.27\" y=\"0.635\" size=\"0.6096\" layer=\"25\">&gt;Name</text>\n<text x=\"-1.27\" y=\"-1.27\" size=\"0.6096\" layer=\"27\">&gt;Value</text>\n<hole x=\"-1.5\" y=\"0\" drill=\"0.9\"/>\n<hole x=\"1.5\" y=\"0\" drill=\"0.9\"/>\n</package>\n<package name=\"VIBE-MOTOR-10MM\">\n<wire x1=\"-1.5\" y1=\"-4.8\" x2=\"-1.5\" y2=\"-7.8\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"-1.5\" y1=\"-7.8\" x2=\"1.5\" y2=\"-7.8\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"1.5\" y1=\"-7.8\" x2=\"1.5\" y2=\"-4.8\" width=\"0.127\" layer=\"51\"/>\n<circle x=\"0\" y=\"0\" radius=\"5.0009\" width=\"0.127\" layer=\"51\"/>\n<pad name=\"+\" x=\"-5\" y=\"-3.9\" drill=\"0.8\" diameter=\"1.6764\"/>\n<pad name=\"-\" x=\"-6.35\" y=\"-2.54\" drill=\"0.8\" diameter=\"1.6764\"/>\n<text x=\"-6.8\" y=\"-2\" size=\"1.27\" layer=\"21\">-</text>\n<text x=\"-4.7\" y=\"-5.3\" size=\"1.27\" layer=\"21\">+</text>\n</package>\n<package name=\"BUZZER-12MM\">\n<description>&lt;b&gt;BUZZER&lt;/b&gt;</description>\n<circle x=\"0\" y=\"0\" radius=\"5.9\" width=\"0.2032\" layer=\"21\"/>\n<circle x=\"0\" y=\"0\" radius=\"1.27\" width=\"0.2032\" layer=\"51\"/>\n<pad name=\"-\" x=\"-3.25\" y=\"0\" drill=\"0.9\" diameter=\"1.778\"/>\n<pad name=\"+\" x=\"3.25\" y=\"0\" drill=\"0.9\" diameter=\"1.778\"/>\n<text x=\"-2.54\" y=\"2.54\" size=\"0.6096\" layer=\"25\" ratio=\"10\">&gt;NAME</text>\n<text x=\"-3.175\" y=\"-3.048\" size=\"0.6096\" layer=\"27\" ratio=\"10\">&gt;VALUE</text>\n</package>\n<package name=\"BUZZER-CMT1603\">\n<wire x1=\"-8\" y1=\"8\" x2=\"-8\" y2=\"-8\" width=\"0.127\" layer=\"21\"/>\n<wire x1=\"-8\" y1=\"-8\" x2=\"8\" y2=\"-8\" width=\"0.127\" layer=\"21\"/>\n<wire x1=\"8\" y1=\"-8\" x2=\"8\" y2=\"8\" width=\"0.127\" layer=\"21\"/>\n<wire x1=\"8\" y1=\"8\" x2=\"-8\" y2=\"8\" width=\"0.127\" layer=\"21\"/>\n<smd name=\"P$1\" x=\"-9.3\" y=\"0\" dx=\"2.5\" dy=\"3\" layer=\"1\"/>\n<smd name=\"P$2\" x=\"9.3\" y=\"0\" dx=\"2.5\" dy=\"3\" layer=\"1\"/>\n</package>\n<package name=\"BUZZER-CCV\">\n<wire x1=\"2.6\" y1=\"-6\" x2=\"-2.6\" y2=\"-6\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"2.6\" y1=\"-6\" x2=\"2.6\" y2=\"-3.7\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"-2.6\" y1=\"-6\" x2=\"-2.6\" y2=\"-3.7\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"-4.2\" y1=\"1.6\" x2=\"1.27\" y2=\"4.318\" width=\"0.2032\" layer=\"21\" curve=\"-86.141052\"/>\n<wire x1=\"3.048\" y1=\"3.302\" x2=\"4.191\" y2=\"1.651\" width=\"0.2032\" layer=\"21\" curve=\"-25.69541\"/>\n<wire x1=\"4.2\" y1=\"-1.6\" x2=\"2.6\" y2=\"-3.7\" width=\"0.2032\" layer=\"21\" curve=\"-31.605028\"/>\n<wire x1=\"-3.302\" y1=\"-3.048\" x2=\"-2.6\" y2=\"-3.6\" width=\"0.2032\" layer=\"21\" curve=\"12.917633\"/>\n<wire x1=\"-2.6\" y1=\"-6\" x2=\"2.6\" y2=\"-6\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"2.6\" y1=\"-6\" x2=\"2.6\" y2=\"-3.7\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-2.6\" y1=\"-6\" x2=\"-2.6\" y2=\"-3.6\" width=\"0.2032\" layer=\"21\"/>\n<circle x=\"0\" y=\"0\" radius=\"4.5\" width=\"0.127\" layer=\"51\"/>\n<smd name=\"-\" x=\"-4\" y=\"0\" dx=\"3.2\" dy=\"2.5\" layer=\"1\"/>\n<smd name=\"+\" x=\"4\" y=\"0\" dx=\"3.2\" dy=\"2.5\" layer=\"1\"/>\n<hole x=\"-3.9\" y=\"-2.25\" drill=\"0.8\"/>\n<hole x=\"2.25\" y=\"3.9\" drill=\"0.8\"/>\n</package>\n<package name=\"BUZZER-CMT1102\">\n<wire x1=\"-5.5\" y1=\"4.5\" x2=\"5.5\" y2=\"4.5\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"5.5\" y1=\"4.5\" x2=\"5.5\" y2=\"-4.5\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"5.5\" y1=\"-4.5\" x2=\"-5.5\" y2=\"-4.5\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"-5.5\" y1=\"-4.5\" x2=\"-5.5\" y2=\"4.5\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"-5.5\" y1=\"4.5\" x2=\"-5.5\" y2=\"2\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-5.5\" y1=\"4.5\" x2=\"5.5\" y2=\"4.5\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"5.5\" y1=\"4.5\" x2=\"5.5\" y2=\"2\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"5.5\" y1=\"-2\" x2=\"5.5\" y2=\"-4.5\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"5.5\" y1=\"-4.5\" x2=\"-5.5\" y2=\"-4.5\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-5.5\" y1=\"-4.5\" x2=\"-5.5\" y2=\"-2\" width=\"0.2032\" layer=\"21\"/>\n<smd name=\"1\" x=\"-6.5\" y=\"0\" dx=\"3\" dy=\"3\" layer=\"1\"/>\n<smd name=\"2\" x=\"6.5\" y=\"0\" dx=\"3\" dy=\"3\" layer=\"1\"/>\n</package>\n<package name=\"BUZZER-12MM-NS\">\n<circle x=\"0\" y=\"0\" radius=\"5.9\" width=\"0.2032\" layer=\"51\"/>\n<circle x=\"0\" y=\"0\" radius=\"1.27\" width=\"0.2032\" layer=\"51\"/>\n<pad name=\"-\" x=\"-3.25\" y=\"0\" drill=\"0.9\"/>\n<pad name=\"+\" x=\"3.25\" y=\"0\" drill=\"0.9\"/>\n<text x=\"-2.54\" y=\"2.54\" size=\"0.6096\" layer=\"25\" ratio=\"10\">&gt;NAME</text>\n<text x=\"-3.175\" y=\"-3.048\" size=\"0.6096\" layer=\"27\" ratio=\"10\">&gt;VALUE</text>\n<text x=\"2.667\" y=\"1.143\" size=\"1.778\" layer=\"51\">+</text>\n</package>\n<package name=\"BUZZER-12MM-NS-KIT\">\n<description>&lt;h3&gt;BUZZER-12MM-NS-KIT&lt;/h3&gt;\nThrough-hole buzzer&lt;br&gt;\n&lt;br&gt;\n&lt;b&gt;Warning:&lt;/b&gt; This is the KIT version of this package. This package has a smaller diameter top stop mask, which doesn't cover the diameter of the pad. This means only the bottom side of the pads' copper will be exposed. You'll only be able to solder to the bottom side.</description>\n<circle x=\"0\" y=\"0\" radius=\"5.9\" width=\"0.2032\" layer=\"51\"/>\n<circle x=\"0\" y=\"0\" radius=\"1.27\" width=\"0.2032\" layer=\"51\"/>\n<pad name=\"-\" x=\"-3.25\" y=\"0\" drill=\"0.9\" diameter=\"1.8796\" stop=\"no\"/>\n<pad name=\"+\" x=\"3.25\" y=\"0\" drill=\"0.9\" diameter=\"1.8796\" stop=\"no\"/>\n<text x=\"-2.54\" y=\"2.54\" size=\"0.6096\" layer=\"25\" ratio=\"10\">&gt;NAME</text>\n<text x=\"-3.175\" y=\"-3.048\" size=\"0.6096\" layer=\"27\" ratio=\"10\">&gt;VALUE</text>\n<text x=\"2.667\" y=\"1.143\" size=\"1.778\" layer=\"51\">+</text>\n<polygon width=\"0.127\" layer=\"30\">\n<vertex x=\"3.2537\" y=\"-0.9525\" curve=\"-90\"/>\n<vertex x=\"2.2988\" y=\"-0.0228\" curve=\"-90.011749\"/>\n<vertex x=\"3.2512\" y=\"0.9526\" curve=\"-90\"/>\n<vertex x=\"4.2012\" y=\"-0.0254\" curve=\"-90.024193\"/>\n</polygon>\n<polygon width=\"0.127\" layer=\"29\">\n<vertex x=\"3.2512\" y=\"-0.4445\" curve=\"-90.012891\"/>\n<vertex x=\"2.8067\" y=\"-0.0203\" curve=\"-90\"/>\n<vertex x=\"3.2512\" y=\"0.447\" curve=\"-90\"/>\n<vertex x=\"3.6931\" y=\"-0.0101\" curve=\"-90.012967\"/>\n</polygon>\n<polygon width=\"0.127\" layer=\"30\">\n<vertex x=\"-3.2487\" y=\"-0.9525\" curve=\"-90\"/>\n<vertex x=\"-4.2036\" y=\"-0.0228\" curve=\"-90.011749\"/>\n<vertex x=\"-3.2512\" y=\"0.9526\" curve=\"-90\"/>\n<vertex x=\"-2.3012\" y=\"-0.0254\" curve=\"-90.024193\"/>\n</polygon>\n<polygon width=\"0.127\" layer=\"29\">\n<vertex x=\"-3.2512\" y=\"-0.4445\" curve=\"-90.012891\"/>\n<vertex x=\"-3.6957\" y=\"-0.0203\" curve=\"-90\"/>\n<vertex x=\"-3.2512\" y=\"0.447\" curve=\"-90\"/>\n<vertex x=\"-2.8093\" y=\"-0.0101\" curve=\"-90.012967\"/>\n</polygon>\n</package>\n<package name=\"BUZZER-CCV-KIT\">\n<description>&lt;h3&gt;BUZZER-CCV-KIT&lt;/h3&gt;\nSMD Buzzer&lt;br&gt;\n&lt;br&gt;\n&lt;b&gt;Warning:&lt;/b&gt; This is the KIT version of this package. This package has longer pads to aid in hand soldering.</description>\n<wire x1=\"2.6\" y1=\"-6\" x2=\"-2.6\" y2=\"-6\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"2.6\" y1=\"-6\" x2=\"2.6\" y2=\"-3.7\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"-2.6\" y1=\"-6\" x2=\"-2.6\" y2=\"-3.7\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"-4.2\" y1=\"1.6\" x2=\"1.27\" y2=\"4.318\" width=\"0.2032\" layer=\"21\" curve=\"-86.141052\"/>\n<wire x1=\"3.048\" y1=\"3.302\" x2=\"4.191\" y2=\"1.651\" width=\"0.2032\" layer=\"21\" curve=\"-25.69541\"/>\n<wire x1=\"4.2\" y1=\"-1.6\" x2=\"2.6\" y2=\"-3.7\" width=\"0.2032\" layer=\"21\" curve=\"-31.605028\"/>\n<wire x1=\"-3.302\" y1=\"-3.048\" x2=\"-2.6\" y2=\"-3.6\" width=\"0.2032\" layer=\"21\" curve=\"12.917633\"/>\n<wire x1=\"-2.6\" y1=\"-6\" x2=\"2.6\" y2=\"-6\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"2.6\" y1=\"-6\" x2=\"2.6\" y2=\"-3.7\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-2.6\" y1=\"-6\" x2=\"-2.6\" y2=\"-3.6\" width=\"0.2032\" layer=\"21\"/>\n<circle x=\"0\" y=\"0\" radius=\"4.5\" width=\"0.127\" layer=\"51\"/>\n<smd name=\"-\" x=\"-4.15\" y=\"0\" dx=\"3.5\" dy=\"2\" layer=\"1\"/>\n<smd name=\"+\" x=\"4.15\" y=\"0\" dx=\"3.5\" dy=\"2\" layer=\"1\"/>\n<rectangle x1=\"-5.2\" y1=\"-0.75\" x2=\"-2.9\" y2=\"0.75\" layer=\"51\"/>\n<rectangle x1=\"2.9\" y1=\"-0.75\" x2=\"5.2\" y2=\"0.75\" layer=\"51\" rot=\"R180\"/>\n<hole x=\"-3.9\" y=\"-2.25\" drill=\"0.8\"/>\n<hole x=\"2.25\" y=\"3.9\" drill=\"0.8\"/>\n</package>\n<package name=\"BUZZER-12MM-KIT\">\n<circle x=\"0\" y=\"0\" radius=\"5.9\" width=\"0.2032\" layer=\"21\"/>\n<circle x=\"0\" y=\"0\" radius=\"1.27\" width=\"0.2032\" layer=\"51\"/>\n<pad name=\"-\" x=\"-3.25\" y=\"0\" drill=\"0.9\" diameter=\"1.8796\" stop=\"no\"/>\n<pad name=\"+\" x=\"3.25\" y=\"0\" drill=\"0.9\" diameter=\"1.8796\" stop=\"no\"/>\n<text x=\"-2.54\" y=\"2.54\" size=\"0.6096\" layer=\"25\" ratio=\"10\">&gt;NAME</text>\n<text x=\"-3.175\" y=\"-3.048\" size=\"0.6096\" layer=\"27\" ratio=\"10\">&gt;VALUE</text>\n<text x=\"2.667\" y=\"1.143\" size=\"1.778\" layer=\"51\">+</text>\n<polygon width=\"0.127\" layer=\"30\">\n<vertex x=\"3.2537\" y=\"-0.9525\" curve=\"-90\"/>\n<vertex x=\"2.2988\" y=\"-0.0228\" curve=\"-90.011749\"/>\n<vertex x=\"3.2512\" y=\"0.9526\" curve=\"-90\"/>\n<vertex x=\"4.2012\" y=\"-0.0254\" curve=\"-90.024193\"/>\n</polygon>\n<polygon width=\"0.127\" layer=\"29\">\n<vertex x=\"3.2512\" y=\"-0.4445\" curve=\"-90.012891\"/>\n<vertex x=\"2.8067\" y=\"-0.0203\" curve=\"-90\"/>\n<vertex x=\"3.2512\" y=\"0.447\" curve=\"-90\"/>\n<vertex x=\"3.6931\" y=\"-0.0101\" curve=\"-90.012967\"/>\n</polygon>\n<polygon width=\"0.127\" layer=\"30\">\n<vertex x=\"-3.2487\" y=\"-0.9525\" curve=\"-90\"/>\n<vertex x=\"-4.2036\" y=\"-0.0228\" curve=\"-90.011749\"/>\n<vertex x=\"-3.2512\" y=\"0.9526\" curve=\"-90\"/>\n<vertex x=\"-2.3012\" y=\"-0.0254\" curve=\"-90.024193\"/>\n</polygon>\n<polygon width=\"0.127\" layer=\"29\">\n<vertex x=\"-3.2512\" y=\"-0.4445\" curve=\"-90.012891\"/>\n<vertex x=\"-3.6957\" y=\"-0.0203\" curve=\"-90\"/>\n<vertex x=\"-3.2512\" y=\"0.447\" curve=\"-90\"/>\n<vertex x=\"-2.8093\" y=\"-0.0101\" curve=\"-90.012967\"/>\n</polygon>\n</package>\n</packages>\n<symbols>\n<symbol name=\"TOGGLE\">\n<wire x1=\"0\" y1=\"0\" x2=\"2.54\" y2=\"1.27\" width=\"0.254\" layer=\"94\"/>\n<wire x1=\"2.54\" y1=\"-2.54\" x2=\"3.175\" y2=\"-2.54\" width=\"0.127\" layer=\"94\"/>\n<wire x1=\"2.54\" y1=\"2.54\" x2=\"3.175\" y2=\"2.54\" width=\"0.1524\" layer=\"94\"/>\n<circle x=\"2.54\" y=\"2.54\" radius=\"0.3592\" width=\"0.2032\" layer=\"94\"/>\n<circle x=\"2.54\" y=\"-2.54\" radius=\"0.3592\" width=\"0.2032\" layer=\"94\"/>\n<circle x=\"0\" y=\"0\" radius=\"0.3592\" width=\"0.2032\" layer=\"94\"/>\n<text x=\"-1.905\" y=\"-6.35\" size=\"1.778\" layer=\"95\">&gt;NAME</text>\n<text x=\"-2.54\" y=\"3.81\" size=\"1.778\" layer=\"96\">&gt;VALUE</text>\n<pin name=\"P\" x=\"-2.54\" y=\"0\" visible=\"off\" length=\"short\" direction=\"pas\"/>\n<pin name=\"S\" x=\"5.08\" y=\"-2.54\" visible=\"off\" length=\"short\" direction=\"pas\" rot=\"R180\"/>\n<pin name=\"O\" x=\"5.08\" y=\"2.54\" visible=\"off\" length=\"short\" direction=\"pas\" rot=\"R180\"/>\n</symbol>\n<symbol name=\"MOTOR\">\n<wire x1=\"-1.27\" y1=\"3.81\" x2=\"-1.27\" y2=\"1.778\" width=\"0.2032\" layer=\"94\"/>\n<wire x1=\"-1.27\" y1=\"3.81\" x2=\"0\" y2=\"3.81\" width=\"0.2032\" layer=\"94\"/>\n<wire x1=\"0\" y1=\"3.81\" x2=\"1.27\" y2=\"3.81\" width=\"0.2032\" layer=\"94\"/>\n<wire x1=\"1.27\" y1=\"3.81\" x2=\"1.27\" y2=\"1.778\" width=\"0.2032\" layer=\"94\"/>\n<wire x1=\"1.27\" y1=\"-3.81\" x2=\"1.27\" y2=\"-1.778\" width=\"0.2032\" layer=\"94\"/>\n<wire x1=\"1.27\" y1=\"-3.81\" x2=\"0\" y2=\"-3.81\" width=\"0.2032\" layer=\"94\"/>\n<wire x1=\"0\" y1=\"-3.81\" x2=\"-1.27\" y2=\"-3.81\" width=\"0.2032\" layer=\"94\"/>\n<wire x1=\"-1.27\" y1=\"-3.81\" x2=\"-1.27\" y2=\"-1.778\" width=\"0.2032\" layer=\"94\"/>\n<wire x1=\"0\" y1=\"5.08\" x2=\"0\" y2=\"3.81\" width=\"0.1524\" layer=\"94\"/>\n<wire x1=\"0\" y1=\"-5.08\" x2=\"0\" y2=\"-3.81\" width=\"0.1524\" layer=\"94\"/>\n<wire x1=\"0.254\" y1=\"3.302\" x2=\"-0.254\" y2=\"3.302\" width=\"0.1524\" layer=\"94\"/>\n<wire x1=\"0\" y1=\"3.556\" x2=\"0\" y2=\"3.048\" width=\"0.1524\" layer=\"94\"/>\n<wire x1=\"0.254\" y1=\"-3.302\" x2=\"-0.254\" y2=\"-3.302\" width=\"0.1524\" layer=\"94\"/>\n<circle x=\"0\" y=\"0\" radius=\"2.032\" width=\"0.254\" layer=\"94\"/>\n<text x=\"2.54\" y=\"0\" size=\"1.778\" layer=\"95\">&gt;NAME</text>\n<text x=\"2.54\" y=\"-2.54\" size=\"1.778\" layer=\"96\">&gt;VALUE</text>\n<pin name=\"+\" x=\"0\" y=\"5.08\" visible=\"off\" length=\"point\" rot=\"R270\"/>\n<pin name=\"-\" x=\"0\" y=\"-5.08\" visible=\"off\" length=\"point\" rot=\"R270\"/>\n</symbol>\n<symbol name=\"BUZZER\">\n<wire x1=\"-1.27\" y1=\"1.905\" x2=\"0\" y2=\"1.905\" width=\"0.1524\" layer=\"94\"/>\n<wire x1=\"0\" y1=\"1.905\" x2=\"0\" y2=\"2.54\" width=\"0.1524\" layer=\"94\"/>\n<wire x1=\"0\" y1=\"1.905\" x2=\"0\" y2=\"1.27\" width=\"0.1524\" layer=\"94\"/>\n<wire x1=\"0.635\" y1=\"3.175\" x2=\"0.635\" y2=\"0.635\" width=\"0.1524\" layer=\"94\"/>\n<wire x1=\"0.635\" y1=\"0.635\" x2=\"1.905\" y2=\"0.635\" width=\"0.1524\" layer=\"94\"/>\n<wire x1=\"1.905\" y1=\"0.635\" x2=\"1.905\" y2=\"3.175\" width=\"0.1524\" layer=\"94\"/>\n<wire x1=\"1.905\" y1=\"3.175\" x2=\"0.635\" y2=\"3.175\" width=\"0.1524\" layer=\"94\"/>\n<wire x1=\"2.54\" y1=\"2.54\" x2=\"2.54\" y2=\"1.905\" width=\"0.1524\" layer=\"94\"/>\n<wire x1=\"2.54\" y1=\"1.905\" x2=\"3.81\" y2=\"1.905\" width=\"0.1524\" layer=\"94\"/>\n<wire x1=\"2.54\" y1=\"1.905\" x2=\"2.54\" y2=\"1.27\" width=\"0.1524\" layer=\"94\"/>\n<wire x1=\"5.08\" y1=\"0\" x2=\"5.08\" y2=\"3.81\" width=\"0.254\" layer=\"94\"/>\n<wire x1=\"5.08\" y1=\"3.81\" x2=\"5.715\" y2=\"3.81\" width=\"0.254\" layer=\"94\"/>\n<wire x1=\"5.715\" y1=\"3.81\" x2=\"5.715\" y2=\"4.445\" width=\"0.254\" layer=\"94\"/>\n<wire x1=\"5.715\" y1=\"4.445\" x2=\"-3.175\" y2=\"4.445\" width=\"0.254\" layer=\"94\"/>\n<wire x1=\"-3.175\" y1=\"4.445\" x2=\"-3.175\" y2=\"3.81\" width=\"0.254\" layer=\"94\"/>\n<wire x1=\"-3.175\" y1=\"3.81\" x2=\"-2.54\" y2=\"3.81\" width=\"0.254\" layer=\"94\"/>\n<wire x1=\"-2.54\" y1=\"3.81\" x2=\"-2.54\" y2=\"0\" width=\"0.254\" layer=\"94\"/>\n<wire x1=\"-2.54\" y1=\"3.81\" x2=\"5.08\" y2=\"3.81\" width=\"0.254\" layer=\"94\"/>\n<wire x1=\"-2.54\" y1=\"0\" x2=\"5.08\" y2=\"0\" width=\"0.254\" layer=\"94\"/>\n<text x=\"-2.54\" y=\"5.08\" size=\"1.778\" layer=\"95\">&gt;NAME</text>\n<text x=\"6.35\" y=\"0\" size=\"1.778\" layer=\"96\">&gt;VALUE</text>\n<pin name=\"2\" x=\"2.54\" y=\"-2.54\" visible=\"off\" length=\"short\" direction=\"pas\" rot=\"R90\"/>\n<pin name=\"1\" x=\"0\" y=\"-2.54\" visible=\"off\" length=\"short\" direction=\"pas\" rot=\"R90\"/>\n</symbol>\n</symbols>\n<devicesets>\n<deviceset name=\"SWITCH-SPDT\" prefix=\"S\" uservalue=\"yes\">\n<description>&lt;b&gt;SPDT Switch&lt;/b&gt;&lt;br&gt;\nSimple slide switch, Spark Fun Electronics SKU : COM-00102&lt;br&gt;\nDPDT SMT slide switch, AYZ0202, SWCH-08179</description>\n<gates>\n<gate name=\"1\" symbol=\"TOGGLE\" x=\"-2.54\" y=\"0\"/>\n</gates>\n<devices>\n<device name=\"PTH\" package=\"SWITCH-SPDT\">\n<connects>\n<connect gate=\"1\" pin=\"O\" pad=\"1\"/>\n<connect gate=\"1\" pin=\"P\" pad=\"2\"/>\n<connect gate=\"1\" pin=\"S\" pad=\"3\"/>\n</connects>\n<technologies>\n<technology name=\"\">\n<attribute name=\"PROD_ID\" value=\"SWCH-08261\"/>\n</technology>\n</technologies>\n</device>\n<device name=\"SMD\" package=\"AYZ0202\">\n<connects>\n<connect gate=\"1\" pin=\"O\" pad=\"1\"/>\n<connect gate=\"1\" pin=\"P\" pad=\"2\"/>\n<connect gate=\"1\" pin=\"S\" pad=\"3\"/>\n</connects>\n<technologies>\n<technology name=\"\">\n<attribute name=\"PROD_ID\" value=\"SWCH-08179\" constant=\"no\"/>\n<attribute name=\"SF_ID\" value=\"COM-00597\" constant=\"no\"/>\n</technology>\n</technologies>\n</device>\n<device name=\"PTH2\" package=\"SWITCHE-DPDT\">\n<connects>\n<connect gate=\"1\" pin=\"O\" pad=\"1\"/>\n<connect gate=\"1\" pin=\"P\" pad=\"2\"/>\n<connect gate=\"1\" pin=\"S\" pad=\"3\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n<device name=\"PTH3\" package=\"R_SW_TH\">\n<connects>\n<connect gate=\"1\" pin=\"O\" pad=\"P$1\"/>\n<connect gate=\"1\" pin=\"P\" pad=\"P$2\"/>\n<connect gate=\"1\" pin=\"S\" pad=\"P$3\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n<device name=\"SMD2\" package=\"SWITCH-SPDT-SMD\">\n<connects>\n<connect gate=\"1\" pin=\"O\" pad=\"1\"/>\n<connect gate=\"1\" pin=\"P\" pad=\"2\"/>\n<connect gate=\"1\" pin=\"S\" pad=\"3\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n<device name=\"PTH_LOCK\" package=\"SWITCH-SPDT_LOCK.007S\">\n<connects>\n<connect gate=\"1\" pin=\"O\" pad=\"1\"/>\n<connect gate=\"1\" pin=\"P\" pad=\"2\"/>\n<connect gate=\"1\" pin=\"S\" pad=\"3\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n<device name=\"KIT\" package=\"SWITCH-SPDT_KIT\">\n<connects>\n<connect gate=\"1\" pin=\"O\" pad=\"1\"/>\n<connect gate=\"1\" pin=\"P\" pad=\"2\"/>\n<connect gate=\"1\" pin=\"S\" pad=\"3\"/>\n</connects>\n<technologies>\n<technology name=\"\">\n<attribute name=\"PROD_ID\" value=\"SWCH-08261\" constant=\"no\"/>\n</technology>\n</technologies>\n</device>\n<device name=\"-SMD-A\" package=\"SWITCH-SPST-SMD-A\">\n<connects>\n<connect gate=\"1\" pin=\"O\" pad=\"1\"/>\n<connect gate=\"1\" pin=\"P\" pad=\"2\"/>\n<connect gate=\"1\" pin=\"S\" pad=\"3\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n</devices>\n</deviceset>\n<deviceset name=\"MOTOR\">\n<description>&lt;b&gt;Vibration Motor- ROB-08449&lt;/b&gt;\nPhysical dimension and wire connections for this powerful vibration motor. Motor has a self adhesive backing.</description>\n<gates>\n<gate name=\"G$1\" symbol=\"MOTOR\" x=\"0\" y=\"0\"/>\n</gates>\n<devices>\n<device name=\"10MM\" package=\"VIBE-MOTOR-10MM\">\n<connects>\n<connect gate=\"G$1\" pin=\"+\" pad=\"+\"/>\n<connect gate=\"G$1\" pin=\"-\" pad=\"-\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n</devices>\n</deviceset>\n<deviceset name=\"BUZZER\" prefix=\"SG\">\n<description>&lt;b&gt;Buzzer 12mm&lt;/b&gt;\nSpark Fun Electronics SKU : Comp-Buzzer</description>\n<gates>\n<gate name=\"G$1\" symbol=\"BUZZER\" x=\"0\" y=\"0\"/>\n</gates>\n<devices>\n<device name=\"PTH\" package=\"BUZZER-12MM\">\n<connects>\n<connect gate=\"G$1\" pin=\"1\" pad=\"+\"/>\n<connect gate=\"G$1\" pin=\"2\" pad=\"-\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n<device name=\"SMD\" package=\"BUZZER-CMT1603\">\n<connects>\n<connect gate=\"G$1\" pin=\"1\" pad=\"P$1\"/>\n<connect gate=\"G$1\" pin=\"2\" pad=\"P$2\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n<device name=\"SMD2\" package=\"BUZZER-CCV\">\n<connects>\n<connect gate=\"G$1\" pin=\"1\" pad=\"+\"/>\n<connect gate=\"G$1\" pin=\"2\" pad=\"-\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n<device name=\"SMD3\" package=\"BUZZER-CMT1102\">\n<connects>\n<connect gate=\"G$1\" pin=\"1\" pad=\"1\"/>\n<connect gate=\"G$1\" pin=\"2\" pad=\"2\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n<device name=\"NS\" package=\"BUZZER-12MM-NS\">\n<connects>\n<connect gate=\"G$1\" pin=\"1\" pad=\"+\"/>\n<connect gate=\"G$1\" pin=\"2\" pad=\"-\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n<device name=\"PTH-NS-KIT\" package=\"BUZZER-12MM-NS-KIT\">\n<connects>\n<connect gate=\"G$1\" pin=\"1\" pad=\"+\"/>\n<connect gate=\"G$1\" pin=\"2\" pad=\"-\"/>\n</connects>\n<technologies>\n<technology name=\"\">\n<attribute name=\"PROD_ID\" value=\"COMP-08253\" constant=\"no\"/>\n</technology>\n</technologies>\n</device>\n<device name=\"SMD2-KIT\" package=\"BUZZER-CCV-KIT\">\n<connects>\n<connect gate=\"G$1\" pin=\"1\" pad=\"+\"/>\n<connect gate=\"G$1\" pin=\"2\" pad=\"-\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n<device name=\"PTH-KIT\" package=\"BUZZER-12MM-KIT\">\n<connects>\n<connect gate=\"G$1\" pin=\"1\" pad=\"+\"/>\n<connect gate=\"G$1\" pin=\"2\" pad=\"-\"/>\n</connects>\n<technologies>\n<technology name=\"\">\n<attribute name=\"PROD_ID\" value=\"COMP-08253\" constant=\"no\"/>\n</technology>\n</technologies>\n</device>\n</devices>\n</deviceset>\n</devicesets>\n</library>\n<library name=\"SparkFun-PowerIC\">\n<description>&lt;h3&gt;SparkFun Electronics' preferred foot prints&lt;/h3&gt;\nIn this library you'll find drivers, regulators, and amplifiers.&lt;br&gt;&lt;br&gt;\nWe've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com.\n&lt;br&gt;&lt;br&gt;\n&lt;b&gt;Licensing:&lt;/b&gt; Creative Commons ShareAlike 4.0 International - https://creativecommons.org/licenses/by-sa/4.0/ \n&lt;br&gt;&lt;br&gt;\nYou are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage.</description>\n<packages>\n<package name=\"SSOP24\">\n<wire x1=\"-4.25\" y1=\"2.5\" x2=\"4.25\" y2=\"2.5\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"4.25\" y1=\"2.5\" x2=\"4.25\" y2=\"-2.5\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"4.25\" y1=\"-2.5\" x2=\"-4.25\" y2=\"-2.5\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-4.25\" y1=\"-2.5\" x2=\"-4.25\" y2=\"2.5\" width=\"0.2032\" layer=\"21\"/>\n<circle x=\"-4.826\" y=\"-3.048\" radius=\"0.2231\" width=\"0.2032\" layer=\"21\"/>\n<smd name=\"24\" x=\"-3.575\" y=\"3.656\" dx=\"0.348\" dy=\"1.397\" layer=\"1\"/>\n<smd name=\"23\" x=\"-2.925\" y=\"3.656\" dx=\"0.348\" dy=\"1.397\" layer=\"1\"/>\n<smd name=\"22\" x=\"-2.275\" y=\"3.656\" dx=\"0.348\" dy=\"1.397\" layer=\"1\"/>\n<smd name=\"20\" x=\"-0.975\" y=\"3.656\" dx=\"0.348\" dy=\"1.397\" layer=\"1\"/>\n<smd name=\"21\" x=\"-1.625\" y=\"3.656\" dx=\"0.348\" dy=\"1.397\" layer=\"1\"/>\n<smd name=\"19\" x=\"-0.325\" y=\"3.656\" dx=\"0.348\" dy=\"1.397\" layer=\"1\"/>\n<smd name=\"18\" x=\"0.325\" y=\"3.656\" dx=\"0.348\" dy=\"1.397\" layer=\"1\"/>\n<smd name=\"17\" x=\"0.975\" y=\"3.656\" dx=\"0.348\" dy=\"1.397\" layer=\"1\"/>\n<smd name=\"16\" x=\"1.625\" y=\"3.656\" dx=\"0.348\" dy=\"1.397\" layer=\"1\"/>\n<smd name=\"15\" x=\"2.275\" y=\"3.656\" dx=\"0.348\" dy=\"1.397\" layer=\"1\"/>\n<smd name=\"1\" x=\"-3.575\" y=\"-3.656\" dx=\"0.348\" dy=\"1.397\" layer=\"1\"/>\n<smd name=\"2\" x=\"-2.925\" y=\"-3.656\" dx=\"0.348\" dy=\"1.397\" layer=\"1\"/>\n<smd name=\"3\" x=\"-2.275\" y=\"-3.656\" dx=\"0.348\" dy=\"1.397\" layer=\"1\"/>\n<smd name=\"4\" x=\"-1.625\" y=\"-3.656\" dx=\"0.348\" dy=\"1.397\" layer=\"1\"/>\n<smd name=\"5\" x=\"-0.975\" y=\"-3.656\" dx=\"0.348\" dy=\"1.397\" layer=\"1\"/>\n<smd name=\"6\" x=\"-0.325\" y=\"-3.656\" dx=\"0.348\" dy=\"1.397\" layer=\"1\"/>\n<smd name=\"7\" x=\"0.325\" y=\"-3.656\" dx=\"0.348\" dy=\"1.397\" layer=\"1\"/>\n<smd name=\"8\" x=\"0.975\" y=\"-3.656\" dx=\"0.348\" dy=\"1.397\" layer=\"1\"/>\n<smd name=\"9\" x=\"1.625\" y=\"-3.656\" dx=\"0.348\" dy=\"1.397\" layer=\"1\"/>\n<smd name=\"10\" x=\"2.275\" y=\"-3.656\" dx=\"0.348\" dy=\"1.397\" layer=\"1\"/>\n<smd name=\"11\" x=\"2.925\" y=\"-3.656\" dx=\"0.348\" dy=\"1.397\" layer=\"1\"/>\n<smd name=\"12\" x=\"3.575\" y=\"-3.656\" dx=\"0.348\" dy=\"1.397\" layer=\"1\"/>\n<smd name=\"13\" x=\"3.575\" y=\"3.656\" dx=\"0.348\" dy=\"1.397\" layer=\"1\" rot=\"R180\"/>\n<smd name=\"14\" x=\"2.925\" y=\"3.656\" dx=\"0.348\" dy=\"1.397\" layer=\"1\" rot=\"R180\"/>\n<text x=\"-3.81\" y=\"1.27\" size=\"0.4064\" layer=\"25\">&gt;NAME</text>\n<text x=\"-3.81\" y=\"0\" size=\"0.4064\" layer=\"27\">&gt;VALUE</text>\n</package>\n</packages>\n<symbols>\n<symbol name=\"TB6612FNG\">\n<wire x1=\"-12.7\" y1=\"-17.78\" x2=\"10.16\" y2=\"-17.78\" width=\"0.4064\" layer=\"94\"/>\n<wire x1=\"10.16\" y1=\"-17.78\" x2=\"10.16\" y2=\"15.24\" width=\"0.4064\" layer=\"94\"/>\n<wire x1=\"10.16\" y1=\"15.24\" x2=\"-12.7\" y2=\"15.24\" width=\"0.6096\" layer=\"94\"/>\n<wire x1=\"-12.7\" y1=\"15.24\" x2=\"-12.7\" y2=\"-17.78\" width=\"0.4064\" layer=\"94\"/>\n<text x=\"-10.16\" y=\"16.51\" size=\"1.778\" layer=\"95\">&gt;NAME</text>\n<text x=\"-10.16\" y=\"-20.32\" size=\"1.778\" layer=\"96\">&gt;VALUE</text>\n<pin name=\"MA1\" x=\"-15.24\" y=\"5.08\" visible=\"pin\" length=\"short\" direction=\"out\"/>\n<pin name=\"PGND1\" x=\"-15.24\" y=\"0\" visible=\"pin\" length=\"short\" direction=\"pwr\"/>\n<pin name=\"MA2\" x=\"-15.24\" y=\"2.54\" visible=\"pin\" length=\"short\" direction=\"out\"/>\n<pin name=\"MB2\" x=\"-15.24\" y=\"-5.08\" visible=\"pin\" length=\"short\" direction=\"out\" swaplevel=\"1\"/>\n<pin name=\"PGND2\" x=\"-15.24\" y=\"-2.54\" visible=\"pin\" length=\"short\" direction=\"pwr\"/>\n<pin name=\"MB1\" x=\"-15.24\" y=\"-7.62\" visible=\"pin\" length=\"short\" direction=\"out\" swaplevel=\"1\"/>\n<pin name=\"PWMB\" x=\"12.7\" y=\"-5.08\" visible=\"pin\" length=\"short\" direction=\"in\" swaplevel=\"1\" rot=\"R180\"/>\n<pin name=\"BIN2\" x=\"12.7\" y=\"-2.54\" visible=\"pin\" length=\"short\" direction=\"in\" swaplevel=\"1\" rot=\"R180\"/>\n<pin name=\"BIN1\" x=\"12.7\" y=\"0\" visible=\"pin\" length=\"short\" direction=\"in\" swaplevel=\"1\" rot=\"R180\"/>\n<pin name=\"GND\" x=\"12.7\" y=\"-7.62\" visible=\"pin\" length=\"short\" direction=\"pwr\" rot=\"R180\"/>\n<pin name=\"STBY\" x=\"12.7\" y=\"2.54\" visible=\"pin\" length=\"short\" rot=\"R180\"/>\n<pin name=\"VCC\" x=\"12.7\" y=\"-10.16\" visible=\"pin\" length=\"short\" direction=\"pwr\" rot=\"R180\"/>\n<pin name=\"AIN1\" x=\"12.7\" y=\"5.08\" visible=\"pin\" length=\"short\" direction=\"in\" rot=\"R180\"/>\n<pin name=\"AIN2\" x=\"12.7\" y=\"7.62\" visible=\"pin\" length=\"short\" direction=\"in\" rot=\"R180\"/>\n<pin name=\"PWMA\" x=\"12.7\" y=\"10.16\" visible=\"pin\" length=\"short\" direction=\"in\" rot=\"R180\"/>\n<pin name=\"VM\" x=\"12.7\" y=\"-12.7\" visible=\"pin\" length=\"short\" direction=\"pwr\" rot=\"R180\"/>\n<pin name=\"VM+\" x=\"7.62\" y=\"-20.32\" visible=\"off\" length=\"short\" direction=\"pwr\" rot=\"R90\"/>\n<pin name=\"VM-\" x=\"5.08\" y=\"-20.32\" visible=\"off\" length=\"short\" direction=\"pwr\" rot=\"R90\"/>\n</symbol>\n</symbols>\n<devicesets>\n<deviceset name=\"TB6612FNG\">\n<description>Toshiba 1A dual motor driver\nIC-09363</description>\n<gates>\n<gate name=\"G$1\" symbol=\"TB6612FNG\" x=\"0\" y=\"0\"/>\n</gates>\n<devices>\n<device name=\"\" package=\"SSOP24\">\n<connects>\n<connect gate=\"G$1\" pin=\"AIN1\" pad=\"21\"/>\n<connect gate=\"G$1\" pin=\"AIN2\" pad=\"22\"/>\n<connect gate=\"G$1\" pin=\"BIN1\" pad=\"17\"/>\n<connect gate=\"G$1\" pin=\"BIN2\" pad=\"16\"/>\n<connect gate=\"G$1\" pin=\"GND\" pad=\"18\"/>\n<connect gate=\"G$1\" pin=\"MA1\" pad=\"1\"/>\n<connect gate=\"G$1\" pin=\"MA2\" pad=\"5\"/>\n<connect gate=\"G$1\" pin=\"MB1\" pad=\"11\"/>\n<connect gate=\"G$1\" pin=\"MB2\" pad=\"7\"/>\n<connect gate=\"G$1\" pin=\"PGND1\" pad=\"3\"/>\n<connect gate=\"G$1\" pin=\"PGND2\" pad=\"9\"/>\n<connect gate=\"G$1\" pin=\"PWMA\" pad=\"23\"/>\n<connect gate=\"G$1\" pin=\"PWMB\" pad=\"15\"/>\n<connect gate=\"G$1\" pin=\"STBY\" pad=\"19\"/>\n<connect gate=\"G$1\" pin=\"VCC\" pad=\"20\"/>\n<connect gate=\"G$1\" pin=\"VM\" pad=\"24\"/>\n<connect gate=\"G$1\" pin=\"VM+\" pad=\"13\"/>\n<connect gate=\"G$1\" pin=\"VM-\" pad=\"10\"/>\n</connects>\n<technologies>\n<technology name=\"\">\n<attribute name=\"PROD_ID\" value=\"IC-09363\"/>\n<attribute name=\"VALUE\" value=\"TB6612FNG\"/>\n</technology>\n</technologies>\n</device>\n</devices>\n</deviceset>\n</devicesets>\n</library>\n<library name=\"switch-coto\">\n<description>&lt;b&gt;COTO TECHNOLOGY&lt;/b&gt;&lt;p&gt;\nReed switch&lt;br&gt;\n&lt;author&gt;Created by librarian@cadsoft.de&lt;/author&gt;</description>\n<packages>\n<package name=\"CT10-XXXX-A2\">\n<description>&lt;b&gt;CT10 Series Molded Switch&lt;/b&gt;&lt;p&gt;\nSource: www.cotorelay.com .. Coto_Technology__CT10-1530-G1.pdf</description>\n<wire x1=\"-6.275\" y1=\"1.1\" x2=\"6.3\" y2=\"1.1\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"6.3\" y1=\"1.1\" x2=\"6.3\" y2=\"-1.1\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"6.3\" y1=\"-1.1\" x2=\"-6.3\" y2=\"-1.1\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-6.3\" y1=\"-1.1\" x2=\"-6.3\" y2=\"1.1\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-6.5\" y1=\"-1.3\" x2=\"-6.5\" y2=\"1.3\" width=\"0\" layer=\"20\"/>\n<wire x1=\"-6.5\" y1=\"1.3\" x2=\"6.5\" y2=\"1.3\" width=\"0\" layer=\"20\"/>\n<wire x1=\"6.5\" y1=\"1.3\" x2=\"6.5\" y2=\"-1.3\" width=\"0\" layer=\"20\"/>\n<wire x1=\"6.5\" y1=\"-1.3\" x2=\"-6.5\" y2=\"-1.3\" width=\"0\" layer=\"20\"/>\n<smd name=\"1\" x=\"-7.5\" y=\"0\" dx=\"1.8\" dy=\"1.8\" layer=\"1\"/>\n<smd name=\"2\" x=\"7.5\" y=\"0\" dx=\"1.8\" dy=\"1.8\" layer=\"1\"/>\n<text x=\"-8.32\" y=\"1.3302\" size=\"1.27\" layer=\"25\">&gt;NAME</text>\n<text x=\"-8.32\" y=\"-3.1082\" size=\"1.27\" layer=\"27\">&gt;VALUE</text>\n<rectangle x1=\"-7.85\" y1=\"-0.575\" x2=\"-6.25\" y2=\"0.575\" layer=\"51\"/>\n<rectangle x1=\"6.3\" y1=\"-0.575\" x2=\"7.85\" y2=\"0.575\" layer=\"51\"/>\n</package>\n<package name=\"CT10-XXXX-G1\">\n<description>&lt;b&gt;CT10 Series Molded Switch&lt;/b&gt;&lt;p&gt;\nSource: www.cotorelay.com .. Coto_Technology__CT10-1530-G1.pdf</description>\n<wire x1=\"-6.275\" y1=\"1.1\" x2=\"6.3\" y2=\"1.1\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"6.3\" y1=\"1.1\" x2=\"6.3\" y2=\"-1.1\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"6.3\" y1=\"-1.1\" x2=\"-6.3\" y2=\"-1.1\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-6.3\" y1=\"-1.1\" x2=\"-6.3\" y2=\"1.1\" width=\"0.2032\" layer=\"21\"/>\n<smd name=\"1\" x=\"-7.625\" y=\"0\" dx=\"1.8\" dy=\"1.8\" layer=\"1\"/>\n<smd name=\"2\" x=\"7.625\" y=\"0\" dx=\"1.8\" dy=\"1.8\" layer=\"1\"/>\n<text x=\"-8.32\" y=\"1.3302\" size=\"1.27\" layer=\"25\">&gt;NAME</text>\n<text x=\"-8.32\" y=\"-3.1082\" size=\"1.27\" layer=\"27\">&gt;VALUE</text>\n<rectangle x1=\"-8.2\" y1=\"-0.575\" x2=\"-6.4\" y2=\"0.575\" layer=\"51\"/>\n<rectangle x1=\"6.4\" y1=\"-0.575\" x2=\"8.2\" y2=\"0.575\" layer=\"51\"/>\n</package>\n<package name=\"CT10-XXXX-G4\">\n<description>&lt;b&gt;CT10 Series Molded Switch&lt;/b&gt;&lt;p&gt;\nSource: www.cotorelay.com .. Coto_Technology__CT10-1530-G1.pdf</description>\n<wire x1=\"-6.275\" y1=\"1.1\" x2=\"6.3\" y2=\"1.1\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"6.3\" y1=\"1.1\" x2=\"6.3\" y2=\"-1.1\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"6.3\" y1=\"-1.1\" x2=\"-6.3\" y2=\"-1.1\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-6.3\" y1=\"-1.1\" x2=\"-6.3\" y2=\"1.1\" width=\"0.2032\" layer=\"21\"/>\n<smd name=\"1\" x=\"-9.2\" y=\"0\" dx=\"1.8\" dy=\"1.8\" layer=\"1\"/>\n<smd name=\"2\" x=\"9.225\" y=\"0\" dx=\"1.8\" dy=\"1.8\" layer=\"1\"/>\n<text x=\"-8.32\" y=\"1.3302\" size=\"1.27\" layer=\"25\">&gt;NAME</text>\n<text x=\"-8.32\" y=\"-3.1082\" size=\"1.27\" layer=\"27\">&gt;VALUE</text>\n<rectangle x1=\"-9.8\" y1=\"-0.575\" x2=\"-6.4\" y2=\"0.575\" layer=\"51\"/>\n<rectangle x1=\"6.4\" y1=\"-0.575\" x2=\"9.8\" y2=\"0.575\" layer=\"51\"/>\n</package>\n</packages>\n<symbols>\n<symbol name=\"SWITCH-NO\">\n<wire x1=\"-2.54\" y1=\"0\" x2=\"2.54\" y2=\"0.889\" width=\"0.254\" layer=\"94\"/>\n<circle x=\"-2.54\" y=\"0\" radius=\"0.2839\" width=\"0\" layer=\"94\"/>\n<circle x=\"2.54\" y=\"0\" radius=\"0.2839\" width=\"0\" layer=\"94\"/>\n<text x=\"-3.81\" y=\"2.54\" size=\"1.778\" layer=\"95\">&gt;NAME</text>\n<text x=\"-3.81\" y=\"-3.81\" size=\"1.778\" layer=\"96\">&gt;VALUE</text>\n<pin name=\"1\" x=\"-5.08\" y=\"0\" visible=\"pad\" length=\"short\" direction=\"pas\"/>\n<pin name=\"2\" x=\"5.08\" y=\"0\" visible=\"pad\" length=\"short\" direction=\"pas\" rot=\"R180\"/>\n</symbol>\n</symbols>\n<devicesets>\n<deviceset name=\"CT10-XXXX-\" prefix=\"SW\">\n<description>&lt;b&gt;CT10 Series Molded Switch&lt;/b&gt;&lt;p&gt;\nSource: www.cotorelay.com .. Coto_Technology__CT10-1530-G1.pdf</description>\n<gates>\n<gate name=\"G$1\" symbol=\"SWITCH-NO\" x=\"0\" y=\"0\"/>\n</gates>\n<devices>\n<device name=\"A2\" package=\"CT10-XXXX-A2\">\n<connects>\n<connect gate=\"G$1\" pin=\"1\" pad=\"1\"/>\n<connect gate=\"G$1\" pin=\"2\" pad=\"2\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n<device name=\"G1\" package=\"CT10-XXXX-G1\">\n<connects>\n<connect gate=\"G$1\" pin=\"1\" pad=\"1\"/>\n<connect gate=\"G$1\" pin=\"2\" pad=\"2\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n<device name=\"G4\" package=\"CT10-XXXX-G4\">\n<connects>\n<connect gate=\"G$1\" pin=\"1\" pad=\"1\"/>\n<connect gate=\"G$1\" pin=\"2\" pad=\"2\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n</devices>\n</deviceset>\n</devicesets>\n</library>\n<library name=\"SparkFun-Resistors\">\n<description>&lt;h3&gt;SparkFun Electronics' preferred foot prints&lt;/h3&gt;\nIn this library you'll find resistors, capacitors, inductors, test points, jumper pads, etc.&lt;br&gt;&lt;br&gt;\nWe've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com.\n&lt;br&gt;&lt;br&gt;\n&lt;b&gt;Licensing:&lt;/b&gt; Creative Commons ShareAlike 4.0 International - https://creativecommons.org/licenses/by-sa/4.0/ \n&lt;br&gt;&lt;br&gt;\nYou are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage.</description>\n<packages>\n<package name=\"0603-RES\">\n<wire x1=\"-1.6002\" y1=\"0.6858\" x2=\"1.6002\" y2=\"0.6858\" width=\"0.0508\" layer=\"39\"/>\n<wire x1=\"1.6002\" y1=\"0.6858\" x2=\"1.6002\" y2=\"-0.6858\" width=\"0.0508\" layer=\"39\"/>\n<wire x1=\"1.6002\" y1=\"-0.6858\" x2=\"-1.6002\" y2=\"-0.6858\" width=\"0.0508\" layer=\"39\"/>\n<wire x1=\"-1.6002\" y1=\"-0.6858\" x2=\"-1.6002\" y2=\"0.6858\" width=\"0.0508\" layer=\"39\"/>\n<wire x1=\"-0.356\" y1=\"0.432\" x2=\"0.356\" y2=\"0.432\" width=\"0.1016\" layer=\"51\"/>\n<wire x1=\"-0.356\" y1=\"-0.419\" x2=\"0.356\" y2=\"-0.419\" width=\"0.1016\" layer=\"51\"/>\n<smd name=\"1\" x=\"-0.85\" y=\"0\" dx=\"1.1\" dy=\"1\" layer=\"1\"/>\n<smd name=\"2\" x=\"0.85\" y=\"0\" dx=\"1.1\" dy=\"1\" layer=\"1\"/>\n<text x=\"-0.889\" y=\"0.762\" size=\"0.4064\" layer=\"25\" font=\"vector\">&gt;NAME</text>\n<text x=\"-1.016\" y=\"-1.143\" size=\"0.4064\" layer=\"27\" font=\"vector\">&gt;VALUE</text>\n<rectangle x1=\"-0.8382\" y1=\"-0.4699\" x2=\"-0.3381\" y2=\"0.4801\" layer=\"51\"/>\n<rectangle x1=\"0.3302\" y1=\"-0.4699\" x2=\"0.8303\" y2=\"0.4801\" layer=\"51\"/>\n<rectangle x1=\"-0.1999\" y1=\"-0.3\" x2=\"0.1999\" y2=\"0.3\" layer=\"35\"/>\n<rectangle x1=\"-0.1905\" y1=\"-0.381\" x2=\"0.1905\" y2=\"0.381\" layer=\"21\"/>\n</package>\n</packages>\n<symbols>\n<symbol name=\"RESISTOR\">\n<wire x1=\"-2.54\" y1=\"0\" x2=\"-2.159\" y2=\"1.016\" width=\"0.1524\" layer=\"94\"/>\n<wire x1=\"-2.159\" y1=\"1.016\" x2=\"-1.524\" y2=\"-1.016\" width=\"0.1524\" layer=\"94\"/>\n<wire x1=\"-1.524\" y1=\"-1.016\" x2=\"-0.889\" y2=\"1.016\" width=\"0.1524\" layer=\"94\"/>\n<wire x1=\"-0.889\" y1=\"1.016\" x2=\"-0.254\" y2=\"-1.016\" width=\"0.1524\" layer=\"94\"/>\n<wire x1=\"-0.254\" y1=\"-1.016\" x2=\"0.381\" y2=\"1.016\" width=\"0.1524\" layer=\"94\"/>\n<wire x1=\"0.381\" y1=\"1.016\" x2=\"1.016\" y2=\"-1.016\" width=\"0.1524\" layer=\"94\"/>\n<wire x1=\"1.016\" y1=\"-1.016\" x2=\"1.651\" y2=\"1.016\" width=\"0.1524\" layer=\"94\"/>\n<wire x1=\"1.651\" y1=\"1.016\" x2=\"2.286\" y2=\"-1.016\" width=\"0.1524\" layer=\"94\"/>\n<wire x1=\"2.286\" y1=\"-1.016\" x2=\"2.54\" y2=\"0\" width=\"0.1524\" layer=\"94\"/>\n<text x=\"-3.81\" y=\"1.4986\" size=\"1.778\" layer=\"95\">&gt;NAME</text>\n<text x=\"-3.81\" y=\"-3.302\" size=\"1.778\" layer=\"96\">&gt;VALUE</text>\n<pin name=\"2\" x=\"5.08\" y=\"0\" visible=\"off\" length=\"short\" direction=\"pas\" swaplevel=\"1\" rot=\"R180\"/>\n<pin name=\"1\" x=\"-5.08\" y=\"0\" visible=\"off\" length=\"short\" direction=\"pas\" swaplevel=\"1\"/>\n</symbol>\n</symbols>\n<devicesets>\n<deviceset name=\"680OHM1/10W5%(0603)\" prefix=\"R\" uservalue=\"yes\">\n<description>RES-09333</description>\n<gates>\n<gate name=\"G$1\" symbol=\"RESISTOR\" x=\"0\" y=\"0\"/>\n</gates>\n<devices>\n<device name=\"\" package=\"0603-RES\">\n<connects>\n<connect gate=\"G$1\" pin=\"1\" pad=\"1\"/>\n<connect gate=\"G$1\" pin=\"2\" pad=\"2\"/>\n</connects>\n<technologies>\n<technology name=\"\">\n<attribute name=\"PROD_ID\" value=\"RES-09333\"/>\n<attribute name=\"VALUE\" value=\"680\" constant=\"no\"/>\n</technology>\n</technologies>\n</device>\n</devices>\n</deviceset>\n</devicesets>\n</library>\n<library name=\"linear\">\n<description>&lt;b&gt;Linear Devices&lt;/b&gt;&lt;p&gt;\nOperational amplifiers,  comparators, voltage regulators, ADCs, DACs, etc.&lt;p&gt;\n&lt;author&gt;Created by librarian@cadsoft.de&lt;/author&gt;</description>\n<packages>\n<package name=\"TO92\">\n<description>&lt;b&gt;TO-92&lt;/b&gt;</description>\n<wire x1=\"-2.095\" y1=\"-1.651\" x2=\"-0.7869\" y2=\"2.5484\" width=\"0.1524\" layer=\"21\" curve=\"-111.097684\"/>\n<wire x1=\"0.7869\" y1=\"2.5484\" x2=\"2.095\" y2=\"-1.651\" width=\"0.1524\" layer=\"21\" curve=\"-111.097684\"/>\n<wire x1=\"-2.095\" y1=\"-1.651\" x2=\"2.095\" y2=\"-1.651\" width=\"0.1524\" layer=\"21\"/>\n<wire x1=\"-2.254\" y1=\"-0.254\" x2=\"-0.286\" y2=\"-0.254\" width=\"0.1524\" layer=\"51\"/>\n<wire x1=\"-2.655\" y1=\"-0.254\" x2=\"-2.254\" y2=\"-0.254\" width=\"0.1524\" layer=\"21\"/>\n<wire x1=\"-0.286\" y1=\"-0.254\" x2=\"0.286\" y2=\"-0.254\" width=\"0.1524\" layer=\"21\"/>\n<wire x1=\"2.254\" y1=\"-0.254\" x2=\"2.655\" y2=\"-0.254\" width=\"0.1524\" layer=\"21\"/>\n<wire x1=\"0.286\" y1=\"-0.254\" x2=\"2.254\" y2=\"-0.254\" width=\"0.1524\" layer=\"51\"/>\n<wire x1=\"-0.7864\" y1=\"2.5484\" x2=\"0.7864\" y2=\"2.5484\" width=\"0.1524\" layer=\"51\" curve=\"-34.298964\"/>\n<pad name=\"1\" x=\"-1.27\" y=\"0\" drill=\"0.8128\" shape=\"octagon\"/>\n<pad name=\"2\" x=\"0\" y=\"1.905\" drill=\"0.8128\" shape=\"octagon\"/>\n<pad name=\"3\" x=\"1.27\" y=\"0\" drill=\"0.8128\" shape=\"octagon\"/>\n<text x=\"2.413\" y=\"1.651\" size=\"1.27\" layer=\"25\" ratio=\"10\">&gt;NAME</text>\n<text x=\"2.921\" y=\"-1.27\" size=\"1.27\" layer=\"27\" ratio=\"10\">&gt;VALUE</text>\n</package>\n<package name=\"TO220H\">\n<description>&lt;b&gt;TO-220&lt;/b&gt;</description>\n<wire x1=\"-5.207\" y1=\"-7.62\" x2=\"5.207\" y2=\"-7.62\" width=\"0.1524\" layer=\"21\"/>\n<wire x1=\"5.207\" y1=\"8.255\" x2=\"-5.207\" y2=\"8.255\" width=\"0.1524\" layer=\"21\"/>\n<wire x1=\"5.207\" y1=\"-7.62\" x2=\"5.207\" y2=\"4.826\" width=\"0.1524\" layer=\"21\"/>\n<wire x1=\"5.207\" y1=\"4.826\" x2=\"4.318\" y2=\"4.826\" width=\"0.1524\" layer=\"21\"/>\n<wire x1=\"4.318\" y1=\"4.826\" x2=\"4.318\" y2=\"6.35\" width=\"0.1524\" layer=\"21\"/>\n<wire x1=\"4.318\" y1=\"6.35\" x2=\"5.207\" y2=\"6.35\" width=\"0.1524\" layer=\"21\"/>\n<wire x1=\"5.207\" y1=\"6.35\" x2=\"5.207\" y2=\"8.255\" width=\"0.1524\" layer=\"21\"/>\n<wire x1=\"-5.207\" y1=\"-7.62\" x2=\"-5.207\" y2=\"4.826\" width=\"0.1524\" layer=\"21\"/>\n<wire x1=\"-5.207\" y1=\"4.826\" x2=\"-4.318\" y2=\"4.826\" width=\"0.1524\" layer=\"21\"/>\n<wire x1=\"-4.318\" y1=\"4.826\" x2=\"-4.318\" y2=\"6.35\" width=\"0.1524\" layer=\"21\"/>\n<wire x1=\"-4.318\" y1=\"6.35\" x2=\"-5.207\" y2=\"6.35\" width=\"0.1524\" layer=\"21\"/>\n<wire x1=\"-5.207\" y1=\"6.35\" x2=\"-5.207\" y2=\"8.255\" width=\"0.1524\" layer=\"21\"/>\n<wire x1=\"-4.572\" y1=\"-6.985\" x2=\"4.572\" y2=\"-6.985\" width=\"0.0508\" layer=\"21\"/>\n<wire x1=\"4.572\" y1=\"1.27\" x2=\"4.572\" y2=\"-6.985\" width=\"0.0508\" layer=\"21\"/>\n<wire x1=\"4.572\" y1=\"1.27\" x2=\"-4.572\" y2=\"1.27\" width=\"0.0508\" layer=\"21\"/>\n<wire x1=\"-4.572\" y1=\"-6.985\" x2=\"-4.572\" y2=\"1.27\" width=\"0.0508\" layer=\"21\"/>\n<circle x=\"0\" y=\"4.826\" radius=\"1.8034\" width=\"0.1524\" layer=\"21\"/>\n<circle x=\"0\" y=\"4.826\" radius=\"2.54\" width=\"0\" layer=\"43\"/>\n<circle x=\"0\" y=\"4.826\" radius=\"2.54\" width=\"0\" layer=\"42\"/>\n<pad name=\"1\" x=\"-2.54\" y=\"-10.16\" drill=\"1.1176\" shape=\"long\" rot=\"R90\"/>\n<pad name=\"2\" x=\"0\" y=\"-10.16\" drill=\"1.1176\" shape=\"long\" rot=\"R90\"/>\n<pad name=\"3\" x=\"2.54\" y=\"-10.16\" drill=\"1.1176\" shape=\"long\" rot=\"R90\"/>\n<text x=\"-5.461\" y=\"-10.922\" size=\"1.778\" layer=\"25\" ratio=\"10\" rot=\"R90\">&gt;NAME</text>\n<text x=\"7.366\" y=\"-11.049\" size=\"1.778\" layer=\"27\" ratio=\"10\" rot=\"R90\">&gt;VALUE</text>\n<rectangle x1=\"2.159\" y1=\"-11.049\" x2=\"2.921\" y2=\"-10.414\" layer=\"21\"/>\n<rectangle x1=\"-0.381\" y1=\"-11.049\" x2=\"0.381\" y2=\"-10.414\" layer=\"21\"/>\n<rectangle x1=\"-2.921\" y1=\"-11.049\" x2=\"-2.159\" y2=\"-10.414\" layer=\"21\"/>\n<rectangle x1=\"-3.175\" y1=\"-10.414\" x2=\"-1.905\" y2=\"-7.62\" layer=\"21\"/>\n<rectangle x1=\"-0.635\" y1=\"-10.414\" x2=\"0.635\" y2=\"-7.62\" layer=\"21\"/>\n<rectangle x1=\"1.905\" y1=\"-10.414\" x2=\"3.175\" y2=\"-7.62\" layer=\"21\"/>\n<hole x=\"0\" y=\"4.826\" drill=\"3.302\"/>\n</package>\n<package name=\"SOT223\">\n<description>&lt;b&gt;Small Outline Transistor&lt;/b&gt;</description>\n<wire x1=\"3.2766\" y1=\"1.778\" x2=\"3.2766\" y2=\"-1.778\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"3.2766\" y1=\"-1.778\" x2=\"-3.2766\" y2=\"-1.778\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-3.2766\" y1=\"-1.778\" x2=\"-3.2766\" y2=\"1.778\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-3.2766\" y1=\"1.778\" x2=\"3.2766\" y2=\"1.778\" width=\"0.2032\" layer=\"21\"/>\n<smd name=\"1\" x=\"-2.3114\" y=\"-3.0988\" dx=\"1.2192\" dy=\"2.2352\" layer=\"1\"/>\n<smd name=\"2\" x=\"0\" y=\"-3.0988\" dx=\"1.2192\" dy=\"2.2352\" layer=\"1\"/>\n<smd name=\"3\" x=\"2.3114\" y=\"-3.0988\" dx=\"1.2192\" dy=\"2.2352\" layer=\"1\"/>\n<smd name=\"4\" x=\"0\" y=\"3.099\" dx=\"3.6\" dy=\"2.2\" layer=\"1\"/>\n<text x=\"1.0208\" y=\"-4.318\" size=\"0.8128\" layer=\"21\" ratio=\"12\">3</text>\n<text x=\"1.905\" y=\"2.54\" size=\"0.8128\" layer=\"21\" ratio=\"12\">4</text>\n<text x=\"-3.4526\" y=\"-4.318\" size=\"0.8128\" layer=\"21\" ratio=\"12\">1</text>\n<text x=\"-1.2906\" y=\"-4.3274\" size=\"0.8128\" layer=\"21\" ratio=\"12\">2</text>\n<text x=\"-2.54\" y=\"0.0508\" size=\"1.27\" layer=\"25\">&gt;NAME</text>\n<text x=\"-2.54\" y=\"-1.3208\" size=\"1.27\" layer=\"27\">&gt;VALUE</text>\n<rectangle x1=\"-1.6002\" y1=\"1.8034\" x2=\"1.6002\" y2=\"3.6576\" layer=\"51\"/>\n<rectangle x1=\"-0.4318\" y1=\"-3.6576\" x2=\"0.4318\" y2=\"-1.8034\" layer=\"51\"/>\n<rectangle x1=\"-2.7432\" y1=\"-3.6576\" x2=\"-1.8796\" y2=\"-1.8034\" layer=\"51\"/>\n<rectangle x1=\"1.8796\" y1=\"-3.6576\" x2=\"2.7432\" y2=\"-1.8034\" layer=\"51\"/>\n<rectangle x1=\"-1.6002\" y1=\"1.8034\" x2=\"1.6002\" y2=\"3.6576\" layer=\"51\"/>\n<rectangle x1=\"-0.4318\" y1=\"-3.6576\" x2=\"0.4318\" y2=\"-1.8034\" layer=\"51\"/>\n<rectangle x1=\"-2.7432\" y1=\"-3.6576\" x2=\"-1.8796\" y2=\"-1.8034\" layer=\"51\"/>\n<rectangle x1=\"1.8796\" y1=\"-3.6576\" x2=\"2.7432\" y2=\"-1.8034\" layer=\"51\"/>\n</package>\n</packages>\n<symbols>\n<symbol name=\"317\">\n<wire x1=\"-7.62\" y1=\"-2.54\" x2=\"7.62\" y2=\"-2.54\" width=\"0.4064\" layer=\"94\"/>\n<wire x1=\"7.62\" y1=\"-2.54\" x2=\"7.62\" y2=\"5.08\" width=\"0.4064\" layer=\"94\"/>\n<wire x1=\"7.62\" y1=\"5.08\" x2=\"-7.62\" y2=\"5.08\" width=\"0.4064\" layer=\"94\"/>\n<wire x1=\"-7.62\" y1=\"5.08\" x2=\"-7.62\" y2=\"-2.54\" width=\"0.4064\" layer=\"94\"/>\n<text x=\"-7.62\" y=\"8.255\" size=\"1.778\" layer=\"95\">&gt;NAME</text>\n<text x=\"-7.62\" y=\"5.715\" size=\"1.778\" layer=\"96\">&gt;VALUE</text>\n<text x=\"-2.032\" y=\"-1.524\" size=\"1.524\" layer=\"95\">ADJ</text>\n<pin name=\"VI\" x=\"-10.16\" y=\"2.54\" length=\"short\" direction=\"in\"/>\n<pin name=\"ADJ\" x=\"0\" y=\"-5.08\" visible=\"pad\" length=\"short\" direction=\"in\" rot=\"R90\"/>\n<pin name=\"VO\" x=\"10.16\" y=\"2.54\" length=\"short\" direction=\"pas\" rot=\"R180\"/>\n</symbol>\n</symbols>\n<devicesets>\n<deviceset name=\"*317\" prefix=\"IC\">\n<description>Positive &lt;b&gt;VOLTAGE REGULATOR&lt;/b&gt;</description>\n<gates>\n<gate name=\"A1\" symbol=\"317\" x=\"0\" y=\"-2.54\"/>\n</gates>\n<devices>\n<device name=\"LZ\" package=\"TO92\">\n<connects>\n<connect gate=\"A1\" pin=\"ADJ\" pad=\"1\"/>\n<connect gate=\"A1\" pin=\"VI\" pad=\"3\"/>\n<connect gate=\"A1\" pin=\"VO\" pad=\"2\"/>\n</connects>\n<technologies>\n<technology name=\"LM\"/>\n</technologies>\n</device>\n<device name=\"T\" package=\"TO220H\">\n<connects>\n<connect gate=\"A1\" pin=\"ADJ\" pad=\"1\"/>\n<connect gate=\"A1\" pin=\"VI\" pad=\"3\"/>\n<connect gate=\"A1\" pin=\"VO\" pad=\"2\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n<device name=\"EMP\" package=\"SOT223\">\n<connects>\n<connect gate=\"A1\" pin=\"ADJ\" pad=\"1\"/>\n<connect gate=\"A1\" pin=\"VI\" pad=\"3\"/>\n<connect gate=\"A1\" pin=\"VO\" pad=\"4\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n</devices>\n</deviceset>\n</devicesets>\n</library>\n<library name=\"SparkFun-Passives\">\n<description>&lt;h3&gt;SparkFun Electronics' preferred foot prints&lt;/h3&gt;\nIn this library you'll find resistors, capacitors, inductors, test points, jumper pads, etc.&lt;br&gt;&lt;br&gt;\nWe've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com.\n&lt;br&gt;&lt;br&gt;\n&lt;b&gt;Licensing:&lt;/b&gt; Creative Commons ShareAlike 4.0 International - https://creativecommons.org/licenses/by-sa/4.0/ \n&lt;br&gt;&lt;br&gt;\nYou are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage.</description>\n<packages>\n<package name=\"1206\">\n<wire x1=\"-2.473\" y1=\"0.983\" x2=\"2.473\" y2=\"0.983\" width=\"0.0508\" layer=\"39\"/>\n<wire x1=\"2.473\" y1=\"-0.983\" x2=\"-2.473\" y2=\"-0.983\" width=\"0.0508\" layer=\"39\"/>\n<wire x1=\"-2.473\" y1=\"-0.983\" x2=\"-2.473\" y2=\"0.983\" width=\"0.0508\" layer=\"39\"/>\n<wire x1=\"2.473\" y1=\"0.983\" x2=\"2.473\" y2=\"-0.983\" width=\"0.0508\" layer=\"39\"/>\n<wire x1=\"-0.965\" y1=\"0.787\" x2=\"0.965\" y2=\"0.787\" width=\"0.1016\" layer=\"51\"/>\n<wire x1=\"-0.965\" y1=\"-0.787\" x2=\"0.965\" y2=\"-0.787\" width=\"0.1016\" layer=\"51\"/>\n<smd name=\"1\" x=\"-1.4\" y=\"0\" dx=\"1.6\" dy=\"1.8\" layer=\"1\"/>\n<smd name=\"2\" x=\"1.4\" y=\"0\" dx=\"1.6\" dy=\"1.8\" layer=\"1\"/>\n<text x=\"-1.27\" y=\"1.143\" size=\"0.4064\" layer=\"25\">&gt;NAME</text>\n<text x=\"-1.397\" y=\"-1.524\" size=\"0.4064\" layer=\"27\">&gt;VALUE</text>\n<rectangle x1=\"-1.7018\" y1=\"-0.8509\" x2=\"-0.9517\" y2=\"0.8491\" layer=\"51\"/>\n<rectangle x1=\"0.9517\" y1=\"-0.8491\" x2=\"1.7018\" y2=\"0.8509\" layer=\"51\"/>\n<rectangle x1=\"-0.1999\" y1=\"-0.4001\" x2=\"0.1999\" y2=\"0.4001\" layer=\"35\"/>\n</package>\n<package name=\"AXIAL-0.3\">\n<wire x1=\"-2.54\" y1=\"0.762\" x2=\"2.54\" y2=\"0.762\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"2.54\" y1=\"0.762\" x2=\"2.54\" y2=\"0\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"2.54\" y1=\"0\" x2=\"2.54\" y2=\"-0.762\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"2.54\" y1=\"-0.762\" x2=\"-2.54\" y2=\"-0.762\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-2.54\" y1=\"-0.762\" x2=\"-2.54\" y2=\"0\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-2.54\" y1=\"0\" x2=\"-2.54\" y2=\"0.762\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"2.54\" y1=\"0\" x2=\"2.794\" y2=\"0\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-2.54\" y1=\"0\" x2=\"-2.794\" y2=\"0\" width=\"0.2032\" layer=\"21\"/>\n<pad name=\"P$1\" x=\"-3.81\" y=\"0\" drill=\"0.9\" diameter=\"1.8796\"/>\n<pad name=\"P$2\" x=\"3.81\" y=\"0\" drill=\"0.9\" diameter=\"1.8796\"/>\n<text x=\"-2.54\" y=\"1.27\" size=\"0.4064\" layer=\"25\" font=\"vector\">&gt;Name</text>\n<text x=\"-2.032\" y=\"-0.381\" size=\"1.016\" layer=\"21\" font=\"vector\" ratio=\"15\">&gt;Value</text>\n</package>\n<package name=\"R2010\">\n<description>&lt;b&gt;RESISTOR&lt;/b&gt;&lt;p&gt;\nchip</description>\n<wire x1=\"-1.662\" y1=\"1.245\" x2=\"1.662\" y2=\"1.245\" width=\"0.1524\" layer=\"51\"/>\n<wire x1=\"-1.637\" y1=\"-1.245\" x2=\"1.687\" y2=\"-1.245\" width=\"0.1524\" layer=\"51\"/>\n<wire x1=\"-3.473\" y1=\"1.483\" x2=\"3.473\" y2=\"1.483\" width=\"0.0508\" layer=\"39\"/>\n<wire x1=\"3.473\" y1=\"1.483\" x2=\"3.473\" y2=\"-1.483\" width=\"0.0508\" layer=\"39\"/>\n<wire x1=\"3.473\" y1=\"-1.483\" x2=\"-3.473\" y2=\"-1.483\" width=\"0.0508\" layer=\"39\"/>\n<wire x1=\"-3.473\" y1=\"-1.483\" x2=\"-3.473\" y2=\"1.483\" width=\"0.0508\" layer=\"39\"/>\n<wire x1=\"-1.027\" y1=\"1.245\" x2=\"1.027\" y2=\"1.245\" width=\"0.1524\" layer=\"21\"/>\n<wire x1=\"-1.002\" y1=\"-1.245\" x2=\"1.016\" y2=\"-1.245\" width=\"0.1524\" layer=\"21\"/>\n<smd name=\"1\" x=\"-2.2\" y=\"0\" dx=\"1.8\" dy=\"2.7\" layer=\"1\"/>\n<smd name=\"2\" x=\"2.2\" y=\"0\" dx=\"1.8\" dy=\"2.7\" layer=\"1\"/>\n<text x=\"-2.54\" y=\"1.5875\" size=\"0.4064\" layer=\"25\">&gt;NAME</text>\n<text x=\"-2.54\" y=\"-2.032\" size=\"0.4064\" layer=\"27\">&gt;VALUE</text>\n<rectangle x1=\"-2.4892\" y1=\"-1.3208\" x2=\"-1.6393\" y2=\"1.3292\" layer=\"51\"/>\n<rectangle x1=\"1.651\" y1=\"-1.3208\" x2=\"2.5009\" y2=\"1.3292\" layer=\"51\"/>\n</package>\n<package name=\"0805\">\n<wire x1=\"-0.3\" y1=\"0.6\" x2=\"0.3\" y2=\"0.6\" width=\"0.1524\" layer=\"21\"/>\n<wire x1=\"-0.3\" y1=\"-0.6\" x2=\"0.3\" y2=\"-0.6\" width=\"0.1524\" layer=\"21\"/>\n<smd name=\"1\" x=\"-0.9\" y=\"0\" dx=\"0.8\" dy=\"1.2\" layer=\"1\"/>\n<smd name=\"2\" x=\"0.9\" y=\"0\" dx=\"0.8\" dy=\"1.2\" layer=\"1\"/>\n<text x=\"-0.762\" y=\"0.8255\" size=\"0.4064\" layer=\"25\">&gt;NAME</text>\n<text x=\"-1.016\" y=\"-1.397\" size=\"0.4064\" layer=\"27\">&gt;VALUE</text>\n</package>\n<package name=\"0603-RES\">\n<wire x1=\"-1.473\" y1=\"0.983\" x2=\"1.473\" y2=\"0.983\" width=\"0.0508\" layer=\"39\"/>\n<wire x1=\"1.473\" y1=\"0.983\" x2=\"1.473\" y2=\"-0.983\" width=\"0.0508\" layer=\"39\"/>\n<wire x1=\"1.473\" y1=\"-0.983\" x2=\"-1.473\" y2=\"-0.983\" width=\"0.0508\" layer=\"39\"/>\n<wire x1=\"-1.473\" y1=\"-0.983\" x2=\"-1.473\" y2=\"0.983\" width=\"0.0508\" layer=\"39\"/>\n<wire x1=\"-0.356\" y1=\"0.432\" x2=\"0.356\" y2=\"0.432\" width=\"0.1016\" layer=\"51\"/>\n<wire x1=\"-0.356\" y1=\"-0.419\" x2=\"0.356\" y2=\"-0.419\" width=\"0.1016\" layer=\"51\"/>\n<smd name=\"1\" x=\"-0.85\" y=\"0\" dx=\"1.1\" dy=\"1\" layer=\"1\"/>\n<smd name=\"2\" x=\"0.85\" y=\"0\" dx=\"1.1\" dy=\"1\" layer=\"1\"/>\n<text x=\"-0.889\" y=\"0.762\" size=\"0.4064\" layer=\"25\" font=\"vector\">&gt;NAME</text>\n<text x=\"-1.016\" y=\"-1.143\" size=\"0.4064\" layer=\"27\" font=\"vector\">&gt;VALUE</text>\n<rectangle x1=\"-0.8382\" y1=\"-0.4699\" x2=\"-0.3381\" y2=\"0.4801\" layer=\"51\"/>\n<rectangle x1=\"0.3302\" y1=\"-0.4699\" x2=\"0.8303\" y2=\"0.4801\" layer=\"51\"/>\n<rectangle x1=\"-0.1999\" y1=\"-0.3\" x2=\"0.1999\" y2=\"0.3\" layer=\"35\"/>\n<rectangle x1=\"-0.2286\" y1=\"-0.381\" x2=\"0.2286\" y2=\"0.381\" layer=\"21\"/>\n</package>\n<package name=\"0402-RES\">\n<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;\nchip</description>\n<wire x1=\"-0.245\" y1=\"0.224\" x2=\"0.245\" y2=\"0.224\" width=\"0.1524\" layer=\"51\"/>\n<wire x1=\"0.245\" y1=\"-0.224\" x2=\"-0.245\" y2=\"-0.224\" width=\"0.1524\" layer=\"51\"/>\n<wire x1=\"-1.473\" y1=\"0.483\" x2=\"1.473\" y2=\"0.483\" width=\"0.0508\" layer=\"39\"/>\n<wire x1=\"1.473\" y1=\"0.483\" x2=\"1.473\" y2=\"-0.483\" width=\"0.0508\" layer=\"39\"/>\n<wire x1=\"1.473\" y1=\"-0.483\" x2=\"-1.473\" y2=\"-0.483\" width=\"0.0508\" layer=\"39\"/>\n<wire x1=\"-1.473\" y1=\"-0.483\" x2=\"-1.473\" y2=\"0.483\" width=\"0.0508\" layer=\"39\"/>\n<smd name=\"1\" x=\"-0.65\" y=\"0\" dx=\"0.7\" dy=\"0.9\" layer=\"1\"/>\n<smd name=\"2\" x=\"0.65\" y=\"0\" dx=\"0.7\" dy=\"0.9\" layer=\"1\"/>\n<text x=\"-0.889\" y=\"0.6985\" size=\"0.4064\" layer=\"25\">&gt;NAME</text>\n<text x=\"-1.0795\" y=\"-1.143\" size=\"0.4064\" layer=\"27\">&gt;VALUE</text>\n<rectangle x1=\"-0.554\" y1=\"-0.3048\" x2=\"-0.254\" y2=\"0.2951\" layer=\"51\"/>\n<rectangle x1=\"0.2588\" y1=\"-0.3048\" x2=\"0.5588\" y2=\"0.2951\" layer=\"51\"/>\n<rectangle x1=\"-0.1999\" y1=\"-0.3\" x2=\"0.1999\" y2=\"0.3\" layer=\"35\"/>\n<rectangle x1=\"-0.2032\" y1=\"-0.3556\" x2=\"0.2032\" y2=\"0.3556\" layer=\"21\"/>\n</package>\n<package name=\"1/6W-RES\">\n<description>1/6W Thru-hole Resistor - *UNPROVEN*</description>\n<wire x1=\"-1.55\" y1=\"0.85\" x2=\"-1.55\" y2=\"-0.85\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-1.55\" y1=\"-0.85\" x2=\"1.55\" y2=\"-0.85\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"1.55\" y1=\"-0.85\" x2=\"1.55\" y2=\"0.85\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"1.55\" y1=\"0.85\" x2=\"-1.55\" y2=\"0.85\" width=\"0.2032\" layer=\"21\"/>\n<pad name=\"1\" x=\"-2.5\" y=\"0\" drill=\"0.762\"/>\n<pad name=\"2\" x=\"2.5\" y=\"0\" drill=\"0.762\"/>\n<text x=\"-1.2662\" y=\"0.9552\" size=\"0.6096\" layer=\"25\">&gt;NAME</text>\n<text x=\"-1.423\" y=\"-0.4286\" size=\"0.8128\" layer=\"21\" ratio=\"15\">&gt;VALUE</text>\n</package>\n<package name=\"R2512\">\n<wire x1=\"-2.362\" y1=\"1.473\" x2=\"2.387\" y2=\"1.473\" width=\"0.1524\" layer=\"51\"/>\n<wire x1=\"-2.362\" y1=\"-1.473\" x2=\"2.387\" y2=\"-1.473\" width=\"0.1524\" layer=\"51\"/>\n<smd name=\"1\" x=\"-2.8\" y=\"0\" dx=\"1.8\" dy=\"3.2\" layer=\"1\"/>\n<smd name=\"2\" x=\"2.8\" y=\"0\" dx=\"1.8\" dy=\"3.2\" layer=\"1\"/>\n<text x=\"-2.54\" y=\"1.905\" size=\"1.27\" layer=\"25\">&gt;NAME</text>\n<text x=\"-2.54\" y=\"-3.175\" size=\"1.27\" layer=\"27\">&gt;VALUE</text>\n<rectangle x1=\"-3.2004\" y1=\"-1.5494\" x2=\"-2.3505\" y2=\"1.5507\" layer=\"51\"/>\n<rectangle x1=\"2.3622\" y1=\"-1.5494\" x2=\"3.2121\" y2=\"1.5507\" layer=\"51\"/>\n</package>\n<package name=\"AXIAL-0.4\">\n<description>1/4W Resistor, 0.4\" wide&lt;p&gt;\n\nYageo CFR series &lt;a href=\"http://www.yageo.com/pdf/yageo/Leaded-R_CFR_2008.pdf\"&gt;http://www.yageo.com/pdf/yageo/Leaded-R_CFR_2008.pdf&lt;/a&gt;</description>\n<wire x1=\"-3.15\" y1=\"-1.2\" x2=\"-3.15\" y2=\"1.2\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-3.15\" y1=\"1.2\" x2=\"3.15\" y2=\"1.2\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"3.15\" y1=\"1.2\" x2=\"3.15\" y2=\"-1.2\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"3.15\" y1=\"-1.2\" x2=\"-3.15\" y2=\"-1.2\" width=\"0.2032\" layer=\"21\"/>\n<pad name=\"P$1\" x=\"-5.08\" y=\"0\" drill=\"0.9\" diameter=\"1.8796\"/>\n<pad name=\"P$2\" x=\"5.08\" y=\"0\" drill=\"0.9\" diameter=\"1.8796\"/>\n<text x=\"-3.175\" y=\"1.905\" size=\"0.8128\" layer=\"25\" font=\"vector\" ratio=\"15\">&gt;Name</text>\n<text x=\"-2.286\" y=\"-0.381\" size=\"0.8128\" layer=\"21\" font=\"vector\" ratio=\"15\">&gt;Value</text>\n</package>\n<package name=\"AXIAL-0.5\">\n<description>1/2W Resistor, 0.5\" wide&lt;p&gt;\n\nYageo CFR series &lt;a href=\"http://www.yageo.com/pdf/yageo/Leaded-R_CFR_2008.pdf\"&gt;http://www.yageo.com/pdf/yageo/Leaded-R_CFR_2008.pdf&lt;/a&gt;</description>\n<wire x1=\"-4.5\" y1=\"-1.65\" x2=\"-4.5\" y2=\"1.65\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-4.5\" y1=\"1.65\" x2=\"4.5\" y2=\"1.65\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"4.5\" y1=\"1.65\" x2=\"4.5\" y2=\"-1.65\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"4.5\" y1=\"-1.65\" x2=\"-4.5\" y2=\"-1.65\" width=\"0.2032\" layer=\"21\"/>\n<pad name=\"P$1\" x=\"-6.35\" y=\"0\" drill=\"0.9\" diameter=\"1.8796\"/>\n<pad name=\"P$2\" x=\"6.35\" y=\"0\" drill=\"0.9\" diameter=\"1.8796\"/>\n<text x=\"-4.445\" y=\"2.54\" size=\"0.8128\" layer=\"25\" font=\"vector\" ratio=\"15\">&gt;Name</text>\n<text x=\"-3.429\" y=\"-0.381\" size=\"0.8128\" layer=\"21\" font=\"vector\" ratio=\"15\">&gt;Value</text>\n</package>\n<package name=\"AXIAL-0.6\">\n<description>1W Resistor, 0.6\" wide&lt;p&gt;\n\nYageo CFR series &lt;a href=\"http://www.yageo.com/pdf/yageo/Leaded-R_CFR_2008.pdf\"&gt;http://www.yageo.com/pdf/yageo/Leaded-R_CFR_2008.pdf&lt;/a&gt;</description>\n<wire x1=\"-5.75\" y1=\"-2.25\" x2=\"-5.75\" y2=\"2.25\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-5.75\" y1=\"2.25\" x2=\"5.75\" y2=\"2.25\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"5.75\" y1=\"2.25\" x2=\"5.75\" y2=\"-2.25\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"5.75\" y1=\"-2.25\" x2=\"-5.75\" y2=\"-2.25\" width=\"0.2032\" layer=\"21\"/>\n<pad name=\"P$1\" x=\"-7.62\" y=\"0\" drill=\"1.2\" diameter=\"1.8796\"/>\n<pad name=\"P$2\" x=\"7.62\" y=\"0\" drill=\"1.2\" diameter=\"1.8796\"/>\n<text x=\"-5.715\" y=\"3.175\" size=\"0.8128\" layer=\"25\" font=\"vector\" ratio=\"15\">&gt;Name</text>\n<text x=\"-4.064\" y=\"-0.381\" size=\"0.8128\" layer=\"21\" font=\"vector\" ratio=\"15\">&gt;Value</text>\n</package>\n<package name=\"AXIAL-0.8\">\n<description>2W Resistor, 0.8\" wide&lt;p&gt;\n\nYageo CFR series &lt;a href=\"http://www.yageo.com/pdf/yageo/Leaded-R_CFR_2008.pdf\"&gt;http://www.yageo.com/pdf/yageo/Leaded-R_CFR_2008.pdf&lt;/a&gt;</description>\n<wire x1=\"-7.75\" y1=\"-2.5\" x2=\"-7.75\" y2=\"2.5\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-7.75\" y1=\"2.5\" x2=\"7.75\" y2=\"2.5\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"7.75\" y1=\"2.5\" x2=\"7.75\" y2=\"-2.5\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"7.75\" y1=\"-2.5\" x2=\"-7.75\" y2=\"-2.5\" width=\"0.2032\" layer=\"21\"/>\n<pad name=\"P$1\" x=\"-10.16\" y=\"0\" drill=\"1.2\" diameter=\"1.8796\"/>\n<pad name=\"P$2\" x=\"10.16\" y=\"0\" drill=\"1.2\" diameter=\"1.8796\"/>\n<text x=\"-7.62\" y=\"3.175\" size=\"0.8128\" layer=\"25\" font=\"vector\" ratio=\"15\">&gt;Name</text>\n<text x=\"-5.969\" y=\"-0.381\" size=\"0.8128\" layer=\"21\" font=\"vector\" ratio=\"15\">&gt;Value</text>\n</package>\n<package name=\"AXIAL-0.3-KIT\">\n<description>&lt;h3&gt;AXIAL-0.3-KIT&lt;/h3&gt;\n\nCommonly used for 1/4W through-hole resistors. 0.3\" pitch between holes.&lt;br&gt;\n&lt;br&gt;\n\n&lt;b&gt;Warning:&lt;/b&gt; This is the KIT version of the AXIAL-0.3 package. This package has a smaller diameter top stop mask, which doesn't cover the diameter of the pad. This means only the bottom side of the pads' copper will be exposed. You'll only be able to solder to the bottom side.</description>\n<wire x1=\"-2.54\" y1=\"1.27\" x2=\"2.54\" y2=\"1.27\" width=\"0.254\" layer=\"21\"/>\n<wire x1=\"2.54\" y1=\"1.27\" x2=\"2.54\" y2=\"0\" width=\"0.254\" layer=\"21\"/>\n<wire x1=\"2.54\" y1=\"0\" x2=\"2.54\" y2=\"-1.27\" width=\"0.254\" layer=\"21\"/>\n<wire x1=\"2.54\" y1=\"-1.27\" x2=\"-2.54\" y2=\"-1.27\" width=\"0.254\" layer=\"21\"/>\n<wire x1=\"-2.54\" y1=\"-1.27\" x2=\"-2.54\" y2=\"0\" width=\"0.254\" layer=\"21\"/>\n<wire x1=\"-2.54\" y1=\"0\" x2=\"-2.54\" y2=\"1.27\" width=\"0.254\" layer=\"21\"/>\n<wire x1=\"2.54\" y1=\"0\" x2=\"2.794\" y2=\"0\" width=\"0.254\" layer=\"21\"/>\n<wire x1=\"-2.54\" y1=\"0\" x2=\"-2.794\" y2=\"0\" width=\"0.254\" layer=\"21\"/>\n<pad name=\"P$1\" x=\"-3.81\" y=\"0\" drill=\"1.016\" diameter=\"2.032\" stop=\"no\"/>\n<pad name=\"P$2\" x=\"3.81\" y=\"0\" drill=\"1.016\" diameter=\"2.032\" stop=\"no\"/>\n<text x=\"-2.54\" y=\"1.27\" size=\"0.4064\" layer=\"25\" font=\"vector\">&gt;Name</text>\n<text x=\"-2.159\" y=\"-0.762\" size=\"1.27\" layer=\"21\" font=\"vector\" ratio=\"15\">&gt;Value</text>\n<polygon width=\"0.127\" layer=\"30\">\n<vertex x=\"3.8201\" y=\"-0.9449\" curve=\"-90\"/>\n<vertex x=\"2.8652\" y=\"-0.0152\" curve=\"-90.011749\"/>\n<vertex x=\"3.8176\" y=\"0.9602\" curve=\"-90\"/>\n<vertex x=\"4.7676\" y=\"-0.0178\" curve=\"-90.024193\"/>\n</polygon>\n<polygon width=\"0.127\" layer=\"29\">\n<vertex x=\"3.8176\" y=\"-0.4369\" curve=\"-90.012891\"/>\n<vertex x=\"3.3731\" y=\"-0.0127\" curve=\"-90\"/>\n<vertex x=\"3.8176\" y=\"0.4546\" curve=\"-90\"/>\n<vertex x=\"4.2595\" y=\"-0.0025\" curve=\"-90.012967\"/>\n</polygon>\n<polygon width=\"0.127\" layer=\"30\">\n<vertex x=\"-3.8075\" y=\"-0.9525\" curve=\"-90\"/>\n<vertex x=\"-4.7624\" y=\"-0.0228\" curve=\"-90.011749\"/>\n<vertex x=\"-3.81\" y=\"0.9526\" curve=\"-90\"/>\n<vertex x=\"-2.86\" y=\"-0.0254\" curve=\"-90.024193\"/>\n</polygon>\n<polygon width=\"0.127\" layer=\"29\">\n<vertex x=\"-3.81\" y=\"-0.4445\" curve=\"-90.012891\"/>\n<vertex x=\"-4.2545\" y=\"-0.0203\" curve=\"-90\"/>\n<vertex x=\"-3.81\" y=\"0.447\" curve=\"-90\"/>\n<vertex x=\"-3.3681\" y=\"-0.0101\" curve=\"-90.012967\"/>\n</polygon>\n</package>\n<package name=\"AXIAL-0.3EZ\">\n<description>This is the \"EZ\" version of the standard .3\" spaced resistor package.&lt;br&gt;\nIt has a reduced top mask to make it harder to install upside-down.</description>\n<wire x1=\"-2.54\" y1=\"0.762\" x2=\"2.54\" y2=\"0.762\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"2.54\" y1=\"0.762\" x2=\"2.54\" y2=\"0\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"2.54\" y1=\"0\" x2=\"2.54\" y2=\"-0.762\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"2.54\" y1=\"-0.762\" x2=\"-2.54\" y2=\"-0.762\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-2.54\" y1=\"-0.762\" x2=\"-2.54\" y2=\"0\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-2.54\" y1=\"0\" x2=\"-2.54\" y2=\"0.762\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"2.54\" y1=\"0\" x2=\"2.794\" y2=\"0\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-2.54\" y1=\"0\" x2=\"-2.794\" y2=\"0\" width=\"0.2032\" layer=\"21\"/>\n<pad name=\"P$1\" x=\"-3.81\" y=\"0\" drill=\"0.9\" diameter=\"1.8796\" stop=\"no\"/>\n<pad name=\"P$2\" x=\"3.81\" y=\"0\" drill=\"0.9\" diameter=\"1.8796\" stop=\"no\"/>\n<text x=\"-2.54\" y=\"1.27\" size=\"0.4064\" layer=\"25\" font=\"vector\">&gt;Name</text>\n<text x=\"-2.032\" y=\"-0.381\" size=\"1.016\" layer=\"21\" font=\"vector\" ratio=\"15\">&gt;Value</text>\n<circle x=\"-3.81\" y=\"0\" radius=\"0.508\" width=\"0\" layer=\"29\"/>\n<circle x=\"3.81\" y=\"0\" radius=\"0.523634375\" width=\"0\" layer=\"29\"/>\n<circle x=\"-3.81\" y=\"0\" radius=\"1.02390625\" width=\"0\" layer=\"30\"/>\n<circle x=\"3.81\" y=\"0\" radius=\"1.04726875\" width=\"0\" layer=\"30\"/>\n</package>\n<package name=\"CAP-PTH-SMALL\">\n<wire x1=\"1.27\" y1=\"0.635\" x2=\"1.27\" y2=\"-0.635\" width=\"0.2032\" layer=\"21\"/>\n<pad name=\"1\" x=\"0\" y=\"0\" drill=\"0.7\" diameter=\"1.651\"/>\n<pad name=\"2\" x=\"2.54\" y=\"0\" drill=\"0.7\" diameter=\"1.651\"/>\n<text x=\"0.508\" y=\"1.27\" size=\"0.4064\" layer=\"25\">&gt;Name</text>\n<text x=\"0.254\" y=\"-1.524\" size=\"0.4064\" layer=\"27\">&gt;Value</text>\n</package>\n<package name=\"CAP-PTH-SMALL2\">\n<wire x1=\"1.27\" y1=\"0.635\" x2=\"1.27\" y2=\"-0.635\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-1.27\" y1=\"1.27\" x2=\"3.81\" y2=\"1.27\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"3.81\" y1=\"1.27\" x2=\"3.81\" y2=\"-1.27\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"3.81\" y1=\"-1.27\" x2=\"-1.27\" y2=\"-1.27\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-1.27\" y1=\"-1.27\" x2=\"-1.27\" y2=\"1.27\" width=\"0.2032\" layer=\"21\"/>\n<pad name=\"1\" x=\"0\" y=\"0\" drill=\"0.7\" diameter=\"1.651\"/>\n<pad name=\"2\" x=\"2.54\" y=\"0\" drill=\"0.7\" diameter=\"1.651\"/>\n<text x=\"-1.27\" y=\"1.905\" size=\"0.6096\" layer=\"25\">&gt;Name</text>\n<text x=\"-1.27\" y=\"-2.54\" size=\"0.6096\" layer=\"27\">&gt;Value</text>\n</package>\n<package name=\"CAP-PTH-LARGE\">\n<wire x1=\"0\" y1=\"0.635\" x2=\"0\" y2=\"0\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"0\" y1=\"0\" x2=\"0\" y2=\"-0.635\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"0\" y1=\"0\" x2=\"-2.54\" y2=\"0\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"0\" y1=\"0\" x2=\"2.54\" y2=\"0\" width=\"0.2032\" layer=\"21\"/>\n<pad name=\"1\" x=\"-4.826\" y=\"0\" drill=\"0.9\" diameter=\"1.905\"/>\n<pad name=\"2\" x=\"4.572\" y=\"0\" drill=\"0.9\" diameter=\"1.905\"/>\n<text x=\"-0.762\" y=\"1.27\" size=\"0.4064\" layer=\"25\">&gt;Name</text>\n<text x=\"-1.016\" y=\"-1.524\" size=\"0.4064\" layer=\"27\">&gt;Value</text>\n</package>\n<package name=\"GRM43D\">\n<wire x1=\"2.25\" y1=\"1.6\" x2=\"1.1\" y2=\"1.6\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"1.1\" y1=\"1.6\" x2=\"-1.1\" y2=\"1.6\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"-1.1\" y1=\"1.6\" x2=\"-2.25\" y2=\"1.6\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"-2.25\" y1=\"1.6\" x2=\"-2.25\" y2=\"-1.6\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"-2.25\" y1=\"-1.6\" x2=\"-1.1\" y2=\"-1.6\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"-1.1\" y1=\"-1.6\" x2=\"1.1\" y2=\"-1.6\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"1.1\" y1=\"-1.6\" x2=\"2.25\" y2=\"-1.6\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"2.25\" y1=\"-1.6\" x2=\"2.25\" y2=\"1.6\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"1.1\" y1=\"1.6\" x2=\"1.1\" y2=\"-1.6\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"-1.1\" y1=\"1.6\" x2=\"-1.1\" y2=\"-1.6\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"-2.3\" y1=\"1.8\" x2=\"2.3\" y2=\"1.8\" width=\"0.127\" layer=\"21\"/>\n<wire x1=\"-2.3\" y1=\"-1.8\" x2=\"2.3\" y2=\"-1.8\" width=\"0.127\" layer=\"21\"/>\n<smd name=\"A\" x=\"1.927\" y=\"0\" dx=\"3.2\" dy=\"1.65\" layer=\"1\" rot=\"R90\"/>\n<smd name=\"C\" x=\"-1.927\" y=\"0\" dx=\"3.2\" dy=\"1.65\" layer=\"1\" rot=\"R90\"/>\n<text x=\"-2\" y=\"2\" size=\"0.4064\" layer=\"25\">&gt;NAME</text>\n<text x=\"0\" y=\"-2\" size=\"0.4064\" layer=\"27\" rot=\"R180\">&gt;VALUE</text>\n<rectangle x1=\"-2.2\" y1=\"-1.6\" x2=\"-1.1\" y2=\"1.6\" layer=\"51\"/>\n<rectangle x1=\"1.1\" y1=\"-1.6\" x2=\"2.2\" y2=\"1.6\" layer=\"51\"/>\n</package>\n<package name=\"0603-CAP\">\n<wire x1=\"-1.473\" y1=\"0.983\" x2=\"1.473\" y2=\"0.983\" width=\"0.0508\" layer=\"39\"/>\n<wire x1=\"1.473\" y1=\"0.983\" x2=\"1.473\" y2=\"-0.983\" width=\"0.0508\" layer=\"39\"/>\n<wire x1=\"1.473\" y1=\"-0.983\" x2=\"-1.473\" y2=\"-0.983\" width=\"0.0508\" layer=\"39\"/>\n<wire x1=\"-1.473\" y1=\"-0.983\" x2=\"-1.473\" y2=\"0.983\" width=\"0.0508\" layer=\"39\"/>\n<wire x1=\"-0.356\" y1=\"0.432\" x2=\"0.356\" y2=\"0.432\" width=\"0.1016\" layer=\"51\"/>\n<wire x1=\"-0.356\" y1=\"-0.419\" x2=\"0.356\" y2=\"-0.419\" width=\"0.1016\" layer=\"51\"/>\n<wire x1=\"0\" y1=\"0.0305\" x2=\"0\" y2=\"-0.0305\" width=\"0.5588\" layer=\"21\"/>\n<smd name=\"1\" x=\"-0.85\" y=\"0\" dx=\"1.1\" dy=\"1\" layer=\"1\"/>\n<smd name=\"2\" x=\"0.85\" y=\"0\" dx=\"1.1\" dy=\"1\" layer=\"1\"/>\n<text x=\"-0.889\" y=\"0.762\" size=\"0.4064\" layer=\"25\" font=\"vector\">&gt;NAME</text>\n<text x=\"-1.016\" y=\"-1.143\" size=\"0.4064\" layer=\"27\" font=\"vector\">&gt;VALUE</text>\n<rectangle x1=\"-0.8382\" y1=\"-0.4699\" x2=\"-0.3381\" y2=\"0.4801\" layer=\"51\"/>\n<rectangle x1=\"0.3302\" y1=\"-0.4699\" x2=\"0.8303\" y2=\"0.4801\" layer=\"51\"/>\n<rectangle x1=\"-0.1999\" y1=\"-0.3\" x2=\"0.1999\" y2=\"0.3\" layer=\"35\"/>\n</package>\n<package name=\"0402-CAP\">\n<description>&lt;b&gt;CAPACITOR&lt;/b&gt;&lt;p&gt;\nchip</description>\n<wire x1=\"-0.245\" y1=\"0.224\" x2=\"0.245\" y2=\"0.224\" width=\"0.1524\" layer=\"51\"/>\n<wire x1=\"0.245\" y1=\"-0.224\" x2=\"-0.245\" y2=\"-0.224\" width=\"0.1524\" layer=\"51\"/>\n<wire x1=\"-1.473\" y1=\"0.483\" x2=\"1.473\" y2=\"0.483\" width=\"0.0508\" layer=\"39\"/>\n<wire x1=\"1.473\" y1=\"0.483\" x2=\"1.473\" y2=\"-0.483\" width=\"0.0508\" layer=\"39\"/>\n<wire x1=\"1.473\" y1=\"-0.483\" x2=\"-1.473\" y2=\"-0.483\" width=\"0.0508\" layer=\"39\"/>\n<wire x1=\"-1.473\" y1=\"-0.483\" x2=\"-1.473\" y2=\"0.483\" width=\"0.0508\" layer=\"39\"/>\n<wire x1=\"0\" y1=\"0.0305\" x2=\"0\" y2=\"-0.0305\" width=\"0.4064\" layer=\"21\"/>\n<smd name=\"1\" x=\"-0.65\" y=\"0\" dx=\"0.7\" dy=\"0.9\" layer=\"1\"/>\n<smd name=\"2\" x=\"0.65\" y=\"0\" dx=\"0.7\" dy=\"0.9\" layer=\"1\"/>\n<text x=\"-0.889\" y=\"0.6985\" size=\"0.4064\" layer=\"25\">&gt;NAME</text>\n<text x=\"-1.0795\" y=\"-1.143\" size=\"0.4064\" layer=\"27\">&gt;VALUE</text>\n<rectangle x1=\"-0.554\" y1=\"-0.3048\" x2=\"-0.254\" y2=\"0.2951\" layer=\"51\"/>\n<rectangle x1=\"0.2588\" y1=\"-0.3048\" x2=\"0.5588\" y2=\"0.2951\" layer=\"51\"/>\n<rectangle x1=\"-0.1999\" y1=\"-0.3\" x2=\"0.1999\" y2=\"0.3\" layer=\"35\"/>\n</package>\n<package name=\"CAP-PTH-5MM\">\n<wire x1=\"0\" y1=\"0.635\" x2=\"0\" y2=\"-0.635\" width=\"0.2032\" layer=\"21\"/>\n<pad name=\"1\" x=\"-2.5\" y=\"0\" drill=\"0.7\" diameter=\"1.651\"/>\n<pad name=\"2\" x=\"2.5\" y=\"0\" drill=\"0.7\" diameter=\"1.651\"/>\n<text x=\"-0.762\" y=\"1.27\" size=\"0.4064\" layer=\"25\">&gt;Name</text>\n<text x=\"-1.016\" y=\"-1.524\" size=\"0.4064\" layer=\"27\">&gt;Value</text>\n</package>\n<package name=\"AXIAL-5MM\">\n<wire x1=\"-1.14\" y1=\"0.762\" x2=\"1.14\" y2=\"0.762\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"1.14\" y1=\"0.762\" x2=\"1.14\" y2=\"0\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"1.14\" y1=\"0\" x2=\"1.14\" y2=\"-0.762\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"1.14\" y1=\"-0.762\" x2=\"-1.14\" y2=\"-0.762\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-1.14\" y1=\"-0.762\" x2=\"-1.14\" y2=\"0\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-1.14\" y1=\"0\" x2=\"-1.14\" y2=\"0.762\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"1.14\" y1=\"0\" x2=\"1.394\" y2=\"0\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-1.14\" y1=\"0\" x2=\"-1.394\" y2=\"0\" width=\"0.2032\" layer=\"21\"/>\n<pad name=\"P$1\" x=\"-2.5\" y=\"0\" drill=\"0.9\" diameter=\"1.8796\"/>\n<pad name=\"P$2\" x=\"2.5\" y=\"0\" drill=\"0.9\" diameter=\"1.8796\"/>\n<text x=\"-2.54\" y=\"1.17\" size=\"0.4\" layer=\"25\">&gt;Name</text>\n<text x=\"-1.032\" y=\"-0.208\" size=\"0.4\" layer=\"21\" ratio=\"15\">&gt;Value</text>\n</package>\n<package name=\"1210\">\n<wire x1=\"-1.6\" y1=\"1.3\" x2=\"1.6\" y2=\"1.3\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"1.6\" y1=\"1.3\" x2=\"1.6\" y2=\"-1.3\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"1.6\" y1=\"-1.3\" x2=\"-1.6\" y2=\"-1.3\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"-1.6\" y1=\"-1.3\" x2=\"-1.6\" y2=\"1.3\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"-1.6\" y1=\"1.3\" x2=\"1.6\" y2=\"1.3\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-1.6\" y1=\"-1.3\" x2=\"1.6\" y2=\"-1.3\" width=\"0.2032\" layer=\"21\"/>\n<smd name=\"1\" x=\"-1.6\" y=\"0\" dx=\"1.2\" dy=\"2\" layer=\"1\"/>\n<smd name=\"2\" x=\"1.6\" y=\"0\" dx=\"1.2\" dy=\"2\" layer=\"1\"/>\n<text x=\"-0.8\" y=\"0.5\" size=\"0.4064\" layer=\"25\">&gt;NAME</text>\n<text x=\"-0.9\" y=\"-0.7\" size=\"0.4064\" layer=\"27\">&gt;VALUE</text>\n</package>\n<package name=\"CTZ3\">\n<description>CTZ3 Series land pattern for variable capacitor - CTZ3E-50C-W1-PF</description>\n<wire x1=\"-1.6\" y1=\"1.4\" x2=\"-1.6\" y2=\"-2.25\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"-1.6\" y1=\"-2.25\" x2=\"1.6\" y2=\"-2.25\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"1.6\" y1=\"1.4\" x2=\"1.6\" y2=\"-2.25\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"-0.5\" y1=\"0\" x2=\"0.5\" y2=\"0\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"-1.6\" y1=\"1.4\" x2=\"-1\" y2=\"2.2\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"1.6\" y1=\"1.4\" x2=\"1\" y2=\"2.2\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"-1\" y1=\"2.2\" x2=\"1\" y2=\"2.2\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"0\" y1=\"0.8\" x2=\"0\" y2=\"-0.8\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"-0.8\" y1=\"0\" x2=\"0.8\" y2=\"0\" width=\"0.127\" layer=\"51\"/>\n<wire x1=\"-1.05\" y1=\"2.25\" x2=\"-1.7\" y2=\"1.45\" width=\"0.127\" layer=\"21\"/>\n<wire x1=\"-1.7\" y1=\"1.45\" x2=\"-1.7\" y2=\"-2.35\" width=\"0.127\" layer=\"21\"/>\n<wire x1=\"-1.7\" y1=\"-2.35\" x2=\"-1.05\" y2=\"-2.35\" width=\"0.127\" layer=\"21\"/>\n<wire x1=\"1.05\" y1=\"2.25\" x2=\"1.7\" y2=\"1.4\" width=\"0.127\" layer=\"21\"/>\n<wire x1=\"1.7\" y1=\"1.4\" x2=\"1.7\" y2=\"-2.35\" width=\"0.127\" layer=\"21\"/>\n<wire x1=\"1.7\" y1=\"-2.35\" x2=\"1.05\" y2=\"-2.35\" width=\"0.127\" layer=\"21\"/>\n<smd name=\"+\" x=\"0\" y=\"2.05\" dx=\"1.5\" dy=\"1.2\" layer=\"1\"/>\n<smd name=\"-\" x=\"0\" y=\"-2.05\" dx=\"1.5\" dy=\"1.2\" layer=\"1\"/>\n<text x=\"-2\" y=\"3\" size=\"0.4064\" layer=\"25\">&gt;NAME</text>\n<text x=\"-2\" y=\"-3.4\" size=\"0.4064\" layer=\"27\">&gt;VALUE</text>\n</package>\n<package name=\"CAP-PTH-SMALL-KIT\">\n<description>&lt;h3&gt;CAP-PTH-SMALL-KIT&lt;/h3&gt;\nCommonly used for small ceramic capacitors. Like our 0.1uF (http://www.sparkfun.com/products/8375) or 22pF caps (http://www.sparkfun.com/products/8571).&lt;br&gt;\n&lt;br&gt;\n&lt;b&gt;Warning:&lt;/b&gt; This is the KIT version of this package. This package has a smaller diameter top stop mask, which doesn't cover the diameter of the pad. This means only the bottom side of the pads' copper will be exposed. You'll only be able to solder to the bottom side.</description>\n<wire x1=\"0\" y1=\"0.635\" x2=\"0\" y2=\"-0.635\" width=\"0.254\" layer=\"21\"/>\n<wire x1=\"-2.667\" y1=\"1.27\" x2=\"2.667\" y2=\"1.27\" width=\"0.254\" layer=\"21\"/>\n<wire x1=\"2.667\" y1=\"1.27\" x2=\"2.667\" y2=\"-1.27\" width=\"0.254\" layer=\"21\"/>\n<wire x1=\"2.667\" y1=\"-1.27\" x2=\"-2.667\" y2=\"-1.27\" width=\"0.254\" layer=\"21\"/>\n<wire x1=\"-2.667\" y1=\"-1.27\" x2=\"-2.667\" y2=\"1.27\" width=\"0.254\" layer=\"21\"/>\n<pad name=\"1\" x=\"-1.397\" y=\"0\" drill=\"1.016\" diameter=\"2.032\" stop=\"no\"/>\n<pad name=\"2\" x=\"1.397\" y=\"0\" drill=\"1.016\" diameter=\"2.032\" stop=\"no\"/>\n<polygon width=\"0.127\" layer=\"30\">\n<vertex x=\"-1.4021\" y=\"-0.9475\" curve=\"-90\"/>\n<vertex x=\"-2.357\" y=\"-0.0178\" curve=\"-90.011749\"/>\n<vertex x=\"-1.4046\" y=\"0.9576\" curve=\"-90\"/>\n<vertex x=\"-0.4546\" y=\"-0.0204\" curve=\"-90.024193\"/>\n</polygon>\n<polygon width=\"0.127\" layer=\"29\">\n<vertex x=\"-1.4046\" y=\"-0.4395\" curve=\"-90.012891\"/>\n<vertex x=\"-1.8491\" y=\"-0.0153\" curve=\"-90\"/>\n<vertex x=\"-1.4046\" y=\"0.452\" curve=\"-90\"/>\n<vertex x=\"-0.9627\" y=\"-0.0051\" curve=\"-90.012967\"/>\n</polygon>\n<polygon width=\"0.127\" layer=\"30\">\n<vertex x=\"1.397\" y=\"-0.9475\" curve=\"-90\"/>\n<vertex x=\"0.4421\" y=\"-0.0178\" curve=\"-90.011749\"/>\n<vertex x=\"1.3945\" y=\"0.9576\" curve=\"-90\"/>\n<vertex x=\"2.3445\" y=\"-0.0204\" curve=\"-90.024193\"/>\n</polygon>\n<polygon width=\"0.127\" layer=\"29\">\n<vertex x=\"1.3945\" y=\"-0.4395\" curve=\"-90.012891\"/>\n<vertex x=\"0.95\" y=\"-0.0153\" curve=\"-90\"/>\n<vertex x=\"1.3945\" y=\"0.452\" curve=\"-90\"/>\n<vertex x=\"1.8364\" y=\"-0.0051\" curve=\"-90.012967\"/>\n</polygon>\n</package>\n<package name=\"CAP-PTH-SMALLEZ\">\n<description>This is the \"EZ\" version of the .1\" spaced ceramic thru-hole cap.&lt;br&gt;\nIt has reduced top mask to make it harder to put the component on the wrong side of the board.</description>\n<wire x1=\"1.27\" y1=\"0.635\" x2=\"1.27\" y2=\"-0.635\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-1.27\" y1=\"1.27\" x2=\"3.81\" y2=\"1.27\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"3.81\" y1=\"1.27\" x2=\"3.81\" y2=\"-1.27\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"3.81\" y1=\"-1.27\" x2=\"-1.27\" y2=\"-1.27\" width=\"0.2032\" layer=\"21\"/>\n<wire x1=\"-1.27\" y1=\"-1.27\" x2=\"-1.27\" y2=\"1.27\" width=\"0.2032\" layer=\"21\"/>\n<pad name=\"1\" x=\"0\" y=\"0\" drill=\"0.7\" diameter=\"1.651\" stop=\"no\"/>\n<pad name=\"2\" x=\"2.54\" y=\"0\" drill=\"0.7\" diameter=\"1.651\" stop=\"no\"/>\n<text x=\"-1.27\" y=\"1.905\" size=\"0.6096\" layer=\"25\">&gt;Name</text>\n<text x=\"-1.27\" y=\"-2.54\" size=\"0.6096\" layer=\"27\">&gt;Value</text>\n<circle x=\"0\" y=\"0\" radius=\"0.898025\" width=\"0\" layer=\"30\"/>\n<circle x=\"2.54\" y=\"0\" radius=\"0.915809375\" width=\"0\" layer=\"30\"/>\n<circle x=\"0\" y=\"0\" radius=\"0.40160625\" width=\"0\" layer=\"29\"/>\n<circle x=\"2.54\" y=\"0\" radius=\"0.40160625\" width=\"0\" layer=\"29\"/>\n</package>\n</packages>\n<symbols>\n<symbol name=\"RESISTOR\">\n<wire x1=\"-2.54\" y1=\"0\" x2=\"-2.159\" y2=\"1.016\" width=\"0.1524\" layer=\"94\"/>\n<wire x1=\"-2.159\" y1=\"1.016\" x2=\"-1.524\" y2=\"-1.016\" width=\"0.1524\" layer=\"94\"/>\n<wire x1=\"-1.524\" y1=\"-1.016\" x2=\"-0.889\" y2=\"1.016\" width=\"0.1524\" layer=\"94\"/>\n<wire x1=\"-0.889\" y1=\"1.016\" x2=\"-0.254\" y2=\"-1.016\" width=\"0.1524\" layer=\"94\"/>\n<wire x1=\"-0.254\" y1=\"-1.016\" x2=\"0.381\" y2=\"1.016\" width=\"0.1524\" layer=\"94\"/>\n<wire x1=\"0.381\" y1=\"1.016\" x2=\"1.016\" y2=\"-1.016\" width=\"0.1524\" layer=\"94\"/>\n<wire x1=\"1.016\" y1=\"-1.016\" x2=\"1.651\" y2=\"1.016\" width=\"0.1524\" layer=\"94\"/>\n<wire x1=\"1.651\" y1=\"1.016\" x2=\"2.286\" y2=\"-1.016\" width=\"0.1524\" layer=\"94\"/>\n<wire x1=\"2.286\" y1=\"-1.016\" x2=\"2.54\" y2=\"0\" width=\"0.1524\" layer=\"94\"/>\n<text x=\"-3.81\" y=\"1.4986\" size=\"1.778\" layer=\"95\">&gt;NAME</text>\n<text x=\"-3.81\" y=\"-3.302\" size=\"1.778\" layer=\"96\">&gt;VALUE</text>\n<pin name=\"2\" x=\"5.08\" y=\"0\" visible=\"off\" length=\"short\" direction=\"pas\" swaplevel=\"1\" rot=\"R180\"/>\n<pin name=\"1\" x=\"-5.08\" y=\"0\" visible=\"off\" length=\"short\" direction=\"pas\" swaplevel=\"1\"/>\n</symbol>\n<symbol name=\"CAP\">\n<wire x1=\"0\" y1=\"2.54\" x2=\"0\" y2=\"2.032\" width=\"0.1524\" layer=\"94\"/>\n<wire x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0.508\" width=\"0.1524\" layer=\"94\"/>\n<text x=\"1.524\" y=\"2.921\" size=\"1.778\" layer=\"95\">&gt;NAME</text>\n<text x=\"1.524\" y=\"-2.159\" size=\"1.778\" layer=\"96\">&gt;VALUE</text>\n<rectangle x1=\"-2.032\" y1=\"0.508\" x2=\"2.032\" y2=\"1.016\" layer=\"94\"/>\n<rectangle x1=\"-2.032\" y1=\"1.524\" x2=\"2.032\" y2=\"2.032\" layer=\"94\"/>\n<pin name=\"1\" x=\"0\" y=\"5.08\" visible=\"off\" length=\"short\" direction=\"pas\" swaplevel=\"1\" rot=\"R270\"/>\n<pin name=\"2\" x=\"0\" y=\"-2.54\" visible=\"off\" length=\"short\" direction=\"pas\" swaplevel=\"1\" rot=\"R90\"/>\n</symbol>\n</symbols>\n<devicesets>\n<deviceset name=\"RESISTOR\" prefix=\"R\" uservalue=\"yes\">\n<description>&lt;b&gt;Resistor&lt;/b&gt;\nBasic schematic elements and footprints for 0603, 1206, and PTH resistors.</description>\n<gates>\n<gate name=\"G$1\" symbol=\"RESISTOR\" x=\"0\" y=\"0\"/>\n</gates>\n<devices>\n<device name=\"1206\" package=\"1206\">\n<connects>\n<connect gate=\"G$1\" pin=\"1\" pad=\"1\"/>\n<connect gate=\"G$1\" pin=\"2\" pad=\"2\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n<device name=\"AXIAL-0.3\" package=\"AXIAL-0.3\">\n<connects>\n<connect gate=\"G$1\" pin=\"1\" pad=\"P$1\"/>\n<connect gate=\"G$1\" pin=\"2\" pad=\"P$2\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n<device name=\"2010\" package=\"R2010\">\n<connects>\n<connect gate=\"G$1\" pin=\"1\" pad=\"1\"/>\n<connect gate=\"G$1\" pin=\"2\" pad=\"2\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n<device name=\"0805-RES\" package=\"0805\">\n<connects>\n<connect gate=\"G$1\" pin=\"1\" pad=\"1\"/>\n<connect gate=\"G$1\" pin=\"2\" pad=\"2\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n<device name=\"0603-RES\" package=\"0603-RES\">\n<connects>\n<connect gate=\"G$1\" pin=\"1\" pad=\"1\"/>\n<connect gate=\"G$1\" pin=\"2\" pad=\"2\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n<device name=\"0402-RES\" package=\"0402-RES\">\n<connects>\n<connect gate=\"G$1\" pin=\"1\" pad=\"1\"/>\n<connect gate=\"G$1\" pin=\"2\" pad=\"2\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n<device name=\"PTH-1/6W\" package=\"1/6W-RES\">\n<connects>\n<connect gate=\"G$1\" pin=\"1\" pad=\"1\"/>\n<connect gate=\"G$1\" pin=\"2\" pad=\"2\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n<device name=\"2512\" package=\"R2512\">\n<connects>\n<connect gate=\"G$1\" pin=\"1\" pad=\"1\"/>\n<connect gate=\"G$1\" pin=\"2\" pad=\"2\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n<device name=\"PTH-1/4W\" package=\"AXIAL-0.4\">\n<connects>\n<connect gate=\"G$1\" pin=\"1\" pad=\"P$1\"/>\n<connect gate=\"G$1\" pin=\"2\" pad=\"P$2\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n<device name=\"PTH-1/2W\" package=\"AXIAL-0.5\">\n<connects>\n<connect gate=\"G$1\" pin=\"1\" pad=\"P$1\"/>\n<connect gate=\"G$1\" pin=\"2\" pad=\"P$2\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n<device name=\"PTH-1W\" package=\"AXIAL-0.6\">\n<connects>\n<connect gate=\"G$1\" pin=\"1\" pad=\"P$1\"/>\n<connect gate=\"G$1\" pin=\"2\" pad=\"P$2\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n<device name=\"PTH-2W\" package=\"AXIAL-0.8\">\n<connects>\n<connect gate=\"G$1\" pin=\"1\" pad=\"P$1\"/>\n<connect gate=\"G$1\" pin=\"2\" pad=\"P$2\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n<device name=\"KIT\" package=\"AXIAL-0.3-KIT\">\n<connects>\n<connect gate=\"G$1\" pin=\"1\" pad=\"P$1\"/>\n<connect gate=\"G$1\" pin=\"2\" pad=\"P$2\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n<device name=\"EZ\" package=\"AXIAL-0.3EZ\">\n<connects>\n<connect gate=\"G$1\" pin=\"1\" pad=\"P$1\"/>\n<connect gate=\"G$1\" pin=\"2\" pad=\"P$2\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n</devices>\n</deviceset>\n<deviceset name=\"CAP\" prefix=\"C\" uservalue=\"yes\">\n<description>&lt;b&gt;Capacitor&lt;/b&gt;\nStandard 0603 ceramic capacitor, and 0.1\" leaded capacitor.</description>\n<gates>\n<gate name=\"G$1\" symbol=\"CAP\" x=\"0\" y=\"0\"/>\n</gates>\n<devices>\n<device name=\"PTH\" package=\"CAP-PTH-SMALL\">\n<connects>\n<connect gate=\"G$1\" pin=\"1\" pad=\"1\"/>\n<connect gate=\"G$1\" pin=\"2\" pad=\"2\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n<device name=\"PTH2\" package=\"CAP-PTH-SMALL2\">\n<connects>\n<connect gate=\"G$1\" pin=\"1\" pad=\"1\"/>\n<connect gate=\"G$1\" pin=\"2\" pad=\"2\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n<device name=\"0805\" package=\"0805\">\n<connects>\n<connect gate=\"G$1\" pin=\"1\" pad=\"1\"/>\n<connect gate=\"G$1\" pin=\"2\" pad=\"2\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n<device name=\"PTH3\" package=\"CAP-PTH-LARGE\">\n<connects>\n<connect gate=\"G$1\" pin=\"1\" pad=\"1\"/>\n<connect gate=\"G$1\" pin=\"2\" pad=\"2\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n<device name=\"SMD\" package=\"GRM43D\">\n<connects>\n<connect gate=\"G$1\" pin=\"1\" pad=\"A\"/>\n<connect gate=\"G$1\" pin=\"2\" pad=\"C\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n<device name=\"0603-CAP\" package=\"0603-CAP\">\n<connects>\n<connect gate=\"G$1\" pin=\"1\" pad=\"1\"/>\n<connect gate=\"G$1\" pin=\"2\" pad=\"2\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n<device name=\"0402-CAP\" package=\"0402-CAP\">\n<connects>\n<connect gate=\"G$1\" pin=\"1\" pad=\"1\"/>\n<connect gate=\"G$1\" pin=\"2\" pad=\"2\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n<device name=\"PTH1\" package=\"CAP-PTH-5MM\">\n<connects>\n<connect gate=\"G$1\" pin=\"1\" pad=\"1\"/>\n<connect gate=\"G$1\" pin=\"2\" pad=\"2\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n<device name=\"_\" package=\"AXIAL-5MM\">\n<connects>\n<connect gate=\"G$1\" pin=\"1\" pad=\"P$1\"/>\n<connect gate=\"G$1\" pin=\"2\" pad=\"P$2\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n<device name=\"1210\" package=\"1210\">\n<connects>\n<connect gate=\"G$1\" pin=\"1\" pad=\"1\"/>\n<connect gate=\"G$1\" pin=\"2\" pad=\"2\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n<device name=\"1206\" package=\"1206\">\n<connects>\n<connect gate=\"G$1\" pin=\"1\" pad=\"1\"/>\n<connect gate=\"G$1\" pin=\"2\" pad=\"2\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n<device name=\"ASMD\" package=\"CTZ3\">\n<connects>\n<connect gate=\"G$1\" pin=\"1\" pad=\"+\"/>\n<connect gate=\"G$1\" pin=\"2\" pad=\"-\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n<device name=\"KIT\" package=\"CAP-PTH-SMALL-KIT\">\n<connects>\n<connect gate=\"G$1\" pin=\"1\" pad=\"1\"/>\n<connect gate=\"G$1\" pin=\"2\" pad=\"2\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n<device name=\"EZ\" package=\"CAP-PTH-SMALLEZ\">\n<connects>\n<connect gate=\"G$1\" pin=\"1\" pad=\"1\"/>\n<connect gate=\"G$1\" pin=\"2\" pad=\"2\"/>\n</connects>\n<technologies>\n<technology name=\"\"/>\n</technologies>\n</device>\n</devices>\n</deviceset>\n</devicesets>\n</library>\n</libraries>\n<attributes>\n</attributes>\n<variantdefs>\n</variantdefs>\n<classes>\n<class number=\"0\" name=\"default\" width=\"0\" drill=\"0\">\n</class>\n</classes>\n<parts>\n<part name=\"BAT\" library=\"battery\" deviceset=\"CRAA\" device=\"\" value=\"4xAA\"/>\n<part name=\"RFDUINO\" library=\"RF_Digital_RFD22102_Eagle_Schematic_PCB_Library\" deviceset=\"RFD22102\" device=\"\"/>\n<part name=\"1B-\" library=\"SparkFun-Electromechanical\" deviceset=\"SWITCH-SPDT\" device=\"PTH_LOCK\" value=\"1B\"/>\n<part name=\"1A\" library=\"SparkFun-Electromechanical\" deviceset=\"SWITCH-SPDT\" device=\"PTH_LOCK\" value=\"1A\"/>\n<part name=\"2B\" library=\"SparkFun-Electromechanical\" deviceset=\"SWITCH-SPDT\" device=\"PTH_LOCK\" value=\"2B\"/>\n<part name=\"2A\" library=\"SparkFun-Electromechanical\" deviceset=\"SWITCH-SPDT\" device=\"PTH_LOCK\" value=\"2A\"/>\n<part name=\"+6V\" library=\"supply1\" deviceset=\"+12V\" device=\"\" value=\"6V\"/>\n<part name=\"3V\" library=\"supply1\" deviceset=\"+3V3\" device=\"\" value=\"3V\"/>\n<part name=\"MOTOR\" library=\"SparkFun-Electromechanical\" deviceset=\"MOTOR\" device=\"10MM\"/>\n<part name=\"HBRIDGE\" library=\"SparkFun-PowerIC\" deviceset=\"TB6612FNG\" device=\"\" value=\"TB6612FNG\"/>\n<part name=\"DOOR\" library=\"switch-coto\" deviceset=\"CT10-XXXX-\" device=\"A2\"/>\n<part name=\"BUZZER\" library=\"SparkFun-Electromechanical\" deviceset=\"BUZZER\" device=\"PTH\"/>\n<part name=\"R1\" library=\"SparkFun-Resistors\" deviceset=\"680OHM1/10W5%(0603)\" device=\"\" value=\"680\"/>\n<part name=\"GND9\" library=\"supply1\" deviceset=\"GND\" device=\"\"/>\n<part name=\"LM317\" library=\"linear\" deviceset=\"*317\" device=\"T\"/>\n<part name=\"R2\" library=\"SparkFun-Passives\" deviceset=\"RESISTOR\" device=\"EZ\" value=\"2k\"/>\n<part name=\"R3\" library=\"SparkFun-Passives\" deviceset=\"RESISTOR\" device=\"EZ\" value=\"2k2\"/>\n<part name=\"C2\" library=\"SparkFun-Passives\" deviceset=\"CAP\" device=\"PTH\" value=\"1uF\"/>\n<part name=\"GND1\" library=\"supply1\" deviceset=\"GND\" device=\"\"/>\n</parts>\n<sheets>\n<sheet>\n<plain>\n<circle x=\"78.74\" y=\"181.61\" radius=\"3.048\" width=\"0.762\" layer=\"104\"/>\n<circle x=\"78.74\" y=\"207.01\" radius=\"3.048\" width=\"0.762\" layer=\"255\"/>\n<text x=\"96.266\" y=\"172.72\" size=\"1.778\" layer=\"97\" rot=\"R90\">ORANGE RING</text>\n<text x=\"94.488\" y=\"214.63\" size=\"1.778\" layer=\"97\" rot=\"R270\">BLACK RING</text>\n<wire x1=\"25.4\" y1=\"223.52\" x2=\"60.96\" y2=\"223.52\" width=\"0.4064\" layer=\"94\" style=\"longdash\"/>\n<wire x1=\"60.96\" y1=\"223.52\" x2=\"60.96\" y2=\"246.38\" width=\"0.4064\" layer=\"94\" style=\"longdash\"/>\n<wire x1=\"60.96\" y1=\"246.38\" x2=\"25.4\" y2=\"246.38\" width=\"0.4064\" layer=\"94\" style=\"longdash\"/>\n<wire x1=\"25.4\" y1=\"246.38\" x2=\"25.4\" y2=\"223.52\" width=\"0.4064\" layer=\"94\" style=\"longdash\"/>\n<text x=\"27.432\" y=\"247.142\" size=\"1.778\" layer=\"95\">REGULATOR</text>\n<text x=\"55.88\" y=\"198.374\" size=\"1.27\" layer=\"98\">BLUE</text>\n<text x=\"55.88\" y=\"195.834\" size=\"1.27\" layer=\"98\">GREEN</text>\n<text x=\"55.88\" y=\"193.294\" size=\"1.27\" layer=\"98\">YELLOW</text>\n<text x=\"55.88\" y=\"190.754\" size=\"1.27\" layer=\"98\">ORANGE</text>\n<text x=\"63.5\" y=\"226.314\" size=\"1.27\" layer=\"98\">BROWN</text>\n<text x=\"63.5\" y=\"239.014\" size=\"1.27\" layer=\"98\">RED</text>\n<text x=\"53.34\" y=\"145.034\" size=\"1.27\" layer=\"98\">GREY</text>\n<text x=\"53.34\" y=\"147.574\" size=\"1.27\" layer=\"98\">WHITE</text>\n<text x=\"53.34\" y=\"150.114\" size=\"1.27\" layer=\"98\">BLACK</text>\n<text x=\"19.05\" y=\"145.034\" size=\"1.27\" layer=\"98\">RED</text>\n<text x=\"19.05\" y=\"142.494\" size=\"1.27\" layer=\"98\">BLACK</text>\n<text x=\"38.1\" y=\"127.254\" size=\"1.27\" layer=\"98\">BLACK</text>\n<text x=\"38.1\" y=\"124.714\" size=\"1.27\" layer=\"98\">RED</text>\n<wire x1=\"48.26\" y1=\"220.98\" x2=\"38.1\" y2=\"220.98\" width=\"0.1524\" layer=\"93\" style=\"longdash\"/>\n<wire x1=\"-2.54\" y1=\"220.98\" x2=\"12.7\" y2=\"220.98\" width=\"0.4064\" layer=\"94\" style=\"longdash\"/>\n<wire x1=\"12.7\" y1=\"220.98\" x2=\"12.7\" y2=\"246.38\" width=\"0.4064\" layer=\"94\" style=\"longdash\"/>\n<wire x1=\"12.7\" y1=\"246.38\" x2=\"-2.54\" y2=\"246.38\" width=\"0.4064\" layer=\"94\" style=\"longdash\"/>\n<wire x1=\"-2.54\" y1=\"246.38\" x2=\"-2.54\" y2=\"220.98\" width=\"0.4064\" layer=\"94\" style=\"longdash\"/>\n<text x=\"-0.508\" y=\"247.142\" size=\"1.778\" layer=\"95\">BATTERY</text>\n<text x=\"15.24\" y=\"239.014\" size=\"1.27\" layer=\"98\">VIOLET</text>\n<wire x1=\"73.66\" y1=\"195.58\" x2=\"93.98\" y2=\"195.58\" width=\"0.4064\" layer=\"94\" style=\"longdash\"/>\n<wire x1=\"93.98\" y1=\"195.58\" x2=\"93.98\" y2=\"218.44\" width=\"0.4064\" layer=\"94\" style=\"longdash\"/>\n<wire x1=\"93.98\" y1=\"218.44\" x2=\"73.66\" y2=\"218.44\" width=\"0.4064\" layer=\"94\" style=\"longdash\"/>\n<wire x1=\"73.66\" y1=\"218.44\" x2=\"73.66\" y2=\"195.58\" width=\"0.4064\" layer=\"94\" style=\"longdash\"/>\n<wire x1=\"73.66\" y1=\"193.04\" x2=\"93.98\" y2=\"193.04\" width=\"0.4064\" layer=\"94\" style=\"longdash\"/>\n<wire x1=\"93.98\" y1=\"193.04\" x2=\"93.98\" y2=\"170.18\" width=\"0.4064\" layer=\"94\" style=\"longdash\"/>\n<wire x1=\"93.98\" y1=\"170.18\" x2=\"73.66\" y2=\"170.18\" width=\"0.4064\" layer=\"94\" style=\"longdash\"/>\n<wire x1=\"73.66\" y1=\"170.18\" x2=\"73.66\" y2=\"193.04\" width=\"0.4064\" layer=\"94\" style=\"longdash\"/>\n<text x=\"53.34\" y=\"142.494\" size=\"1.27\" layer=\"98\">WHITE</text>\n<text x=\"53.34\" y=\"139.954\" size=\"1.27\" layer=\"98\">GREY</text>\n<text x=\"55.88\" y=\"188.214\" size=\"1.27\" layer=\"98\">GREY</text>\n<text x=\"63.5\" y=\"228.854\" size=\"1.27\" layer=\"98\">WHITE</text>\n<text x=\"63.5\" y=\"241.554\" size=\"1.27\" layer=\"98\">GREY</text>\n<text x=\"22.606\" y=\"180.34\" size=\"1.27\" layer=\"98\" rot=\"R90\">BLACK</text>\n<text x=\"25.146\" y=\"180.34\" size=\"1.27\" layer=\"98\" rot=\"R90\">WHITE</text>\n<text x=\"2.286\" y=\"213.36\" size=\"1.27\" layer=\"98\" rot=\"R90\">BLACK</text>\n<text x=\"-0.254\" y=\"213.36\" size=\"1.27\" layer=\"98\" rot=\"R90\">RED</text>\n</plain>\n<instances>\n<instance part=\"BAT\" gate=\"G$1\" x=\"7.62\" y=\"233.68\" smashed=\"yes\" rot=\"R90\">\n<attribute name=\"VALUE\" x=\"4.064\" y=\"230.632\" size=\"1.778\" layer=\"96\" rot=\"R90\"/>\n</instance>\n<instance part=\"RFDUINO\" gate=\"G$1\" x=\"40.64\" y=\"195.58\"/>\n<instance part=\"1B-\" gate=\"1\" x=\"81.28\" y=\"187.96\" smashed=\"yes\">\n<attribute name=\"VALUE\" x=\"83.82\" y=\"186.69\" size=\"1.778\" layer=\"96\"/>\n</instance>\n<instance part=\"1A\" gate=\"1\" x=\"81.28\" y=\"175.26\" smashed=\"yes\">\n<attribute name=\"VALUE\" x=\"83.82\" y=\"173.99\" size=\"1.778\" layer=\"96\"/>\n</instance>\n<instance part=\"2B\" gate=\"1\" x=\"81.28\" y=\"213.36\" smashed=\"yes\">\n<attribute name=\"VALUE\" x=\"83.82\" y=\"212.09\" size=\"1.778\" layer=\"96\"/>\n</instance>\n<instance part=\"2A\" gate=\"1\" x=\"81.28\" y=\"200.66\" smashed=\"yes\">\n<attribute name=\"VALUE\" x=\"83.82\" y=\"199.39\" size=\"1.778\" layer=\"96\"/>\n</instance>\n<instance part=\"+6V\" gate=\"1\" x=\"7.62\" y=\"243.84\" smashed=\"yes\">\n<attribute name=\"VALUE\" x=\"3.048\" y=\"241.808\" size=\"1.778\" layer=\"96\"/>\n</instance>\n<instance part=\"3V\" gate=\"G$1\" x=\"53.34\" y=\"243.84\" smashed=\"yes\">\n<attribute name=\"VALUE\" x=\"49.276\" y=\"241.808\" size=\"1.778\" layer=\"96\"/>\n</instance>\n<instance part=\"MOTOR\" gate=\"G$1\" x=\"10.16\" y=\"144.78\" smashed=\"yes\" rot=\"R270\">\n<attribute name=\"NAME\" x=\"6.35\" y=\"147.32\" size=\"1.778\" layer=\"95\"/>\n</instance>\n<instance part=\"HBRIDGE\" gate=\"G$1\" x=\"40.64\" y=\"149.86\"/>\n<instance part=\"DOOR\" gate=\"G$1\" x=\"15.24\" y=\"187.96\" smashed=\"yes\">\n<attribute name=\"NAME\" x=\"12.7\" y=\"185.42\" size=\"1.778\" layer=\"95\"/>\n</instance>\n<instance part=\"BUZZER\" gate=\"G$1\" x=\"7.62\" y=\"193.04\" smashed=\"yes\">\n<attribute name=\"NAME\" x=\"5.08\" y=\"198.12\" size=\"1.778\" layer=\"95\"/>\n</instance>\n<instance part=\"R1\" gate=\"G$1\" x=\"15.24\" y=\"190.5\" smashed=\"yes\">\n<attribute name=\"VALUE\" x=\"13.97\" y=\"192.278\" size=\"1.778\" layer=\"96\"/>\n</instance>\n<instance part=\"GND9\" gate=\"1\" x=\"7.62\" y=\"185.42\"/>\n<instance part=\"LM317\" gate=\"A1\" x=\"38.1\" y=\"236.22\" smashed=\"yes\">\n<attribute name=\"NAME\" x=\"32.004\" y=\"241.935\" size=\"1.778\" layer=\"95\"/>\n</instance>\n<instance part=\"R2\" gate=\"G$1\" x=\"45.72\" y=\"226.06\" smashed=\"yes\" rot=\"R180\">\n<attribute name=\"VALUE\" x=\"51.308\" y=\"228.346\" size=\"1.778\" layer=\"96\" rot=\"R180\"/>\n</instance>\n<instance part=\"R3\" gate=\"G$1\" x=\"48.26\" y=\"233.68\" smashed=\"yes\" rot=\"R90\">\n<attribute name=\"VALUE\" x=\"44.958\" y=\"233.172\" size=\"1.778\" layer=\"96\" rot=\"R270\"/>\n</instance>\n<instance part=\"C2\" gate=\"G$1\" x=\"53.34\" y=\"233.68\" smashed=\"yes\" rot=\"R180\">\n<attribute name=\"VALUE\" x=\"50.673\" y=\"237.49\" size=\"1.778\" layer=\"96\" rot=\"R270\"/>\n</instance>\n<instance part=\"GND1\" gate=\"1\" x=\"7.62\" y=\"226.06\" smashed=\"yes\">\n<attribute name=\"VALUE\" x=\"5.08\" y=\"223.774\" size=\"1.778\" layer=\"96\"/>\n</instance>\n</instances>\n<busses>\n</busses>\n<nets>\n<net name=\"BLACK_GND\" class=\"0\">\n<segment>\n<pinref part=\"DOOR\" gate=\"G$1\" pin=\"1\"/>\n<pinref part=\"GND9\" gate=\"1\" pin=\"GND\"/>\n<wire x1=\"10.16\" y1=\"187.96\" x2=\"7.62\" y2=\"187.96\" width=\"0.1524\" layer=\"91\"/>\n<pinref part=\"BUZZER\" gate=\"G$1\" pin=\"1\"/>\n<wire x1=\"7.62\" y1=\"190.5\" x2=\"7.62\" y2=\"187.96\" width=\"0.1524\" layer=\"91\"/>\n<junction x=\"7.62\" y=\"187.96\"/>\n</segment>\n</net>\n<net name=\"2A\" class=\"0\">\n<segment>\n<pinref part=\"2A\" gate=\"1\" pin=\"P\"/>\n<wire x1=\"78.74\" y1=\"200.66\" x2=\"71.12\" y2=\"200.66\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"71.12\" y1=\"200.66\" x2=\"71.12\" y2=\"195.58\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"55.88\" y1=\"195.58\" x2=\"71.12\" y2=\"195.58\" width=\"0.1524\" layer=\"91\"/>\n</segment>\n</net>\n<net name=\"1A\" class=\"0\">\n<segment>\n<pinref part=\"1A\" gate=\"1\" pin=\"P\"/>\n<wire x1=\"78.74\" y1=\"175.26\" x2=\"68.58\" y2=\"175.26\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"68.58\" y1=\"175.26\" x2=\"68.58\" y2=\"190.5\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"55.88\" y1=\"190.5\" x2=\"68.58\" y2=\"190.5\" width=\"0.1524\" layer=\"91\"/>\n</segment>\n</net>\n<net name=\"BLACK_OUT\" class=\"0\">\n<segment>\n<pinref part=\"MOTOR\" gate=\"G$1\" pin=\"-\"/>\n<wire x1=\"5.08\" y1=\"144.78\" x2=\"5.08\" y2=\"142.24\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"5.08\" y1=\"142.24\" x2=\"25.4\" y2=\"142.24\" width=\"0.1524\" layer=\"91\"/>\n<pinref part=\"HBRIDGE\" gate=\"G$1\" pin=\"MB1\"/>\n</segment>\n</net>\n<net name=\"MB2\" class=\"0\">\n<segment>\n<pinref part=\"MOTOR\" gate=\"G$1\" pin=\"+\"/>\n<pinref part=\"HBRIDGE\" gate=\"G$1\" pin=\"MB2\"/>\n<wire x1=\"15.24\" y1=\"144.78\" x2=\"25.4\" y2=\"144.78\" width=\"0.1524\" layer=\"91\"/>\n</segment>\n</net>\n<net name=\"PWMB\" class=\"0\">\n<segment>\n<pinref part=\"HBRIDGE\" gate=\"G$1\" pin=\"PWMB\"/>\n<wire x1=\"53.34\" y1=\"144.78\" x2=\"66.04\" y2=\"144.78\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"66.04\" y1=\"144.78\" x2=\"66.04\" y2=\"187.96\" width=\"0.1524\" layer=\"91\"/>\n<pinref part=\"RFDUINO\" gate=\"G$1\" pin=\"GPIO2\"/>\n<wire x1=\"66.04\" y1=\"187.96\" x2=\"55.88\" y2=\"187.96\" width=\"0.1524\" layer=\"91\"/>\n</segment>\n</net>\n<net name=\"BIN2\" class=\"0\">\n<segment>\n<pinref part=\"HBRIDGE\" gate=\"G$1\" pin=\"BIN2\"/>\n<wire x1=\"63.5\" y1=\"147.32\" x2=\"53.34\" y2=\"147.32\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"63.5\" y1=\"175.26\" x2=\"25.4\" y2=\"175.26\" width=\"0.1524\" layer=\"91\"/>\n<pinref part=\"RFDUINO\" gate=\"G$1\" pin=\"GPIO1\"/>\n<wire x1=\"25.4\" y1=\"175.26\" x2=\"25.4\" y2=\"187.96\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"63.5\" y1=\"147.32\" x2=\"63.5\" y2=\"175.26\" width=\"0.1524\" layer=\"91\"/>\n</segment>\n</net>\n<net name=\"BIN1\" class=\"0\">\n<segment>\n<pinref part=\"HBRIDGE\" gate=\"G$1\" pin=\"BIN1\"/>\n<wire x1=\"53.34\" y1=\"149.86\" x2=\"60.96\" y2=\"149.86\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"60.96\" y1=\"172.72\" x2=\"22.86\" y2=\"172.72\" width=\"0.1524\" layer=\"91\"/>\n<pinref part=\"RFDUINO\" gate=\"G$1\" pin=\"GPIO0\"/>\n<wire x1=\"22.86\" y1=\"190.5\" x2=\"25.4\" y2=\"190.5\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"22.86\" y1=\"172.72\" x2=\"22.86\" y2=\"190.5\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"60.96\" y1=\"149.86\" x2=\"60.96\" y2=\"172.72\" width=\"0.1524\" layer=\"91\"/>\n</segment>\n</net>\n<net name=\"2B\" class=\"0\">\n<segment>\n<pinref part=\"2B\" gate=\"1\" pin=\"P\"/>\n<wire x1=\"78.74\" y1=\"213.36\" x2=\"68.58\" y2=\"213.36\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"68.58\" y1=\"213.36\" x2=\"68.58\" y2=\"198.12\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"55.88\" y1=\"198.12\" x2=\"68.58\" y2=\"198.12\" width=\"0.1524\" layer=\"91\"/>\n</segment>\n</net>\n<net name=\"1B\" class=\"0\">\n<segment>\n<pinref part=\"1B-\" gate=\"1\" pin=\"P\"/>\n<wire x1=\"78.74\" y1=\"187.96\" x2=\"71.12\" y2=\"187.96\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"71.12\" y1=\"187.96\" x2=\"71.12\" y2=\"193.04\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"55.88\" y1=\"193.04\" x2=\"71.12\" y2=\"193.04\" width=\"0.1524\" layer=\"91\"/>\n</segment>\n</net>\n<net name=\"N$4\" class=\"0\">\n<segment>\n<pinref part=\"R1\" gate=\"G$1\" pin=\"1\"/>\n<pinref part=\"BUZZER\" gate=\"G$1\" pin=\"2\"/>\n</segment>\n</net>\n<net name=\"N$1\" class=\"0\">\n<segment>\n<pinref part=\"LM317\" gate=\"A1\" pin=\"ADJ\"/>\n<pinref part=\"R2\" gate=\"G$1\" pin=\"2\"/>\n<wire x1=\"40.64\" y1=\"226.06\" x2=\"38.1\" y2=\"226.06\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"38.1\" y1=\"226.06\" x2=\"38.1\" y2=\"228.6\" width=\"0.1524\" layer=\"91\"/>\n<junction x=\"38.1\" y=\"228.6\"/>\n<wire x1=\"38.1\" y1=\"228.6\" x2=\"38.1\" y2=\"231.14\" width=\"0.1524\" layer=\"91\"/>\n<pinref part=\"R3\" gate=\"G$1\" pin=\"1\"/>\n<wire x1=\"38.1\" y1=\"228.6\" x2=\"48.26\" y2=\"228.6\" width=\"0.1524\" layer=\"91\"/>\n</segment>\n</net>\n<net name=\"+6V\" class=\"0\">\n<segment>\n<wire x1=\"0\" y1=\"124.46\" x2=\"0\" y2=\"238.76\" width=\"0.1524\" layer=\"91\"/>\n<pinref part=\"BAT\" gate=\"G$1\" pin=\"+\"/>\n<pinref part=\"LM317\" gate=\"A1\" pin=\"VI\"/>\n<wire x1=\"7.62\" y1=\"238.76\" x2=\"27.94\" y2=\"238.76\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"0\" y1=\"238.76\" x2=\"7.62\" y2=\"238.76\" width=\"0.1524\" layer=\"91\"/>\n<junction x=\"7.62\" y=\"238.76\"/>\n<pinref part=\"+6V\" gate=\"1\" pin=\"+12V\"/>\n<wire x1=\"7.62\" y1=\"241.3\" x2=\"7.62\" y2=\"238.76\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"0\" y1=\"124.46\" x2=\"48.26\" y2=\"124.46\" width=\"0.1524\" layer=\"91\"/>\n<pinref part=\"HBRIDGE\" gate=\"G$1\" pin=\"VM+\"/>\n<wire x1=\"48.26\" y1=\"124.46\" x2=\"48.26\" y2=\"129.54\" width=\"0.1524\" layer=\"91\"/>\n</segment>\n</net>\n<net name=\"GND\" class=\"0\">\n<segment>\n<pinref part=\"HBRIDGE\" gate=\"G$1\" pin=\"VM-\"/>\n<wire x1=\"45.72\" y1=\"129.54\" x2=\"45.72\" y2=\"127\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"45.72\" y1=\"127\" x2=\"2.54\" y2=\"127\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"2.54\" y1=\"127\" x2=\"2.54\" y2=\"228.6\" width=\"0.1524\" layer=\"91\"/>\n<pinref part=\"BAT\" gate=\"G$1\" pin=\"-\"/>\n<wire x1=\"2.54\" y1=\"228.6\" x2=\"7.62\" y2=\"228.6\" width=\"0.1524\" layer=\"91\"/>\n<pinref part=\"GND1\" gate=\"1\" pin=\"GND\"/>\n<junction x=\"7.62\" y=\"228.6\"/>\n<pinref part=\"HBRIDGE\" gate=\"G$1\" pin=\"GND\"/>\n<wire x1=\"53.34\" y1=\"142.24\" x2=\"99.06\" y2=\"142.24\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"53.34\" y1=\"142.24\" x2=\"45.72\" y2=\"142.24\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"45.72\" y1=\"142.24\" x2=\"45.72\" y2=\"129.54\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"99.06\" y1=\"142.24\" x2=\"99.06\" y2=\"228.6\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"58.42\" y1=\"228.6\" x2=\"99.06\" y2=\"228.6\" width=\"0.1524\" layer=\"91\"/>\n<pinref part=\"1A\" gate=\"1\" pin=\"S\"/>\n<pinref part=\"RFDUINO\" gate=\"G$1\" pin=\"GND\"/>\n<wire x1=\"25.4\" y1=\"203.2\" x2=\"25.4\" y2=\"215.9\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"25.4\" y1=\"215.9\" x2=\"58.42\" y2=\"215.9\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"58.42\" y1=\"215.9\" x2=\"58.42\" y2=\"226.06\" width=\"0.1524\" layer=\"91\"/>\n<pinref part=\"R2\" gate=\"G$1\" pin=\"1\"/>\n<wire x1=\"50.8\" y1=\"226.06\" x2=\"53.34\" y2=\"226.06\" width=\"0.1524\" layer=\"91\"/>\n<pinref part=\"2B\" gate=\"1\" pin=\"S\"/>\n<wire x1=\"53.34\" y1=\"226.06\" x2=\"58.42\" y2=\"226.06\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"58.42\" y1=\"226.06\" x2=\"88.9\" y2=\"226.06\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"88.9\" y1=\"210.82\" x2=\"86.36\" y2=\"210.82\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"88.9\" y1=\"210.82\" x2=\"88.9\" y2=\"226.06\" width=\"0.1524\" layer=\"91\"/>\n<junction x=\"88.9\" y=\"210.82\"/>\n<pinref part=\"2A\" gate=\"1\" pin=\"S\"/>\n<wire x1=\"88.9\" y1=\"198.12\" x2=\"86.36\" y2=\"198.12\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"88.9\" y1=\"198.12\" x2=\"88.9\" y2=\"210.82\" width=\"0.1524\" layer=\"91\"/>\n<junction x=\"88.9\" y=\"198.12\"/>\n<pinref part=\"1B-\" gate=\"1\" pin=\"S\"/>\n<wire x1=\"88.9\" y1=\"185.42\" x2=\"86.36\" y2=\"185.42\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"88.9\" y1=\"185.42\" x2=\"88.9\" y2=\"198.12\" width=\"0.1524\" layer=\"91\"/>\n<junction x=\"88.9\" y=\"185.42\"/>\n<wire x1=\"88.9\" y1=\"172.72\" x2=\"88.9\" y2=\"185.42\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"88.9\" y1=\"172.72\" x2=\"86.36\" y2=\"172.72\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"58.42\" y1=\"228.6\" x2=\"58.42\" y2=\"226.06\" width=\"0.1524\" layer=\"91\"/>\n<junction x=\"58.42\" y=\"226.06\"/>\n<junction x=\"58.42\" y=\"226.06\"/>\n<pinref part=\"C2\" gate=\"G$1\" pin=\"1\"/>\n<wire x1=\"53.34\" y1=\"228.6\" x2=\"53.34\" y2=\"226.06\" width=\"0.1524\" layer=\"91\"/>\n<junction x=\"53.34\" y=\"226.06\"/>\n</segment>\n</net>\n<net name=\"+3V3\" class=\"0\">\n<segment>\n<pinref part=\"LM317\" gate=\"A1\" pin=\"VO\"/>\n<pinref part=\"R3\" gate=\"G$1\" pin=\"2\"/>\n<pinref part=\"C2\" gate=\"G$1\" pin=\"2\"/>\n<wire x1=\"53.34\" y1=\"236.22\" x2=\"53.34\" y2=\"238.76\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"53.34\" y1=\"238.76\" x2=\"48.26\" y2=\"238.76\" width=\"0.1524\" layer=\"91\"/>\n<pinref part=\"1A\" gate=\"1\" pin=\"O\"/>\n<pinref part=\"2B\" gate=\"1\" pin=\"O\"/>\n<wire x1=\"91.44\" y1=\"215.9\" x2=\"86.36\" y2=\"215.9\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"91.44\" y1=\"215.9\" x2=\"91.44\" y2=\"238.76\" width=\"0.1524\" layer=\"91\"/>\n<junction x=\"91.44\" y=\"215.9\"/>\n<pinref part=\"2A\" gate=\"1\" pin=\"O\"/>\n<wire x1=\"91.44\" y1=\"203.2\" x2=\"86.36\" y2=\"203.2\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"91.44\" y1=\"203.2\" x2=\"91.44\" y2=\"215.9\" width=\"0.1524\" layer=\"91\"/>\n<junction x=\"91.44\" y=\"203.2\"/>\n<pinref part=\"1B-\" gate=\"1\" pin=\"O\"/>\n<wire x1=\"91.44\" y1=\"190.5\" x2=\"86.36\" y2=\"190.5\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"91.44\" y1=\"190.5\" x2=\"91.44\" y2=\"203.2\" width=\"0.1524\" layer=\"91\"/>\n<junction x=\"91.44\" y=\"190.5\"/>\n<wire x1=\"91.44\" y1=\"177.8\" x2=\"91.44\" y2=\"190.5\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"91.44\" y1=\"177.8\" x2=\"86.36\" y2=\"177.8\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"91.44\" y1=\"238.76\" x2=\"55.88\" y2=\"238.76\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"55.88\" y1=\"218.44\" x2=\"55.88\" y2=\"238.76\" width=\"0.1524\" layer=\"91\"/>\n<pinref part=\"RFDUINO\" gate=\"G$1\" pin=\"VCC\"/>\n<wire x1=\"25.4\" y1=\"198.12\" x2=\"22.86\" y2=\"198.12\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"22.86\" y1=\"198.12\" x2=\"22.86\" y2=\"218.44\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"22.86\" y1=\"218.44\" x2=\"55.88\" y2=\"218.44\" width=\"0.1524\" layer=\"91\"/>\n<pinref part=\"HBRIDGE\" gate=\"G$1\" pin=\"VCC\"/>\n<wire x1=\"53.34\" y1=\"139.7\" x2=\"101.6\" y2=\"139.7\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"101.6\" y1=\"241.3\" x2=\"101.6\" y2=\"139.7\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"55.88\" y1=\"241.3\" x2=\"101.6\" y2=\"241.3\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"55.88\" y1=\"241.3\" x2=\"55.88\" y2=\"238.76\" width=\"0.1524\" layer=\"91\"/>\n<junction x=\"55.88\" y=\"238.76\"/>\n<wire x1=\"53.34\" y1=\"238.76\" x2=\"55.88\" y2=\"238.76\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"55.88\" y1=\"238.76\" x2=\"60.96\" y2=\"238.76\" width=\"0.1524\" layer=\"91\"/>\n<wire x1=\"60.96\" y1=\"238.76\" x2=\"60.96\" y2=\"231.14\" width=\"0.1524\" layer=\"91\"/>\n<pinref part=\"3V\" gate=\"G$1\" pin=\"+3V3\"/>\n<wire x1=\"53.34\" y1=\"238.76\" x2=\"53.34\" y2=\"241.3\" width=\"0.1524\" layer=\"91\"/>\n<junction x=\"53.34\" y=\"238.76\"/>\n<junction x=\"55.88\" y=\"238.76\"/>\n</segment>\n</net>\n</nets>\n</sheet>\n</sheets>\n</schematic>\n</drawing>\n</eagle>\n"
  },
  {
    "path": "examples/lock/rfduino/sensor.cpp",
    "content": "#include \"sensor.h\"\n\n// #define DEBUG(message) Serial.print(message)\n#define DEBUG(message)\n\n\nSensor::Sensor(uint32_t pin_) :\n  pin(pin_)\n{\n  pinMode(pin, INPUT);\n}\n\nSensor::operator int() {\n  int retval = digitalRead(pin);\n  DEBUG(\"Sensor::int(pin=\"); DEBUG(pin); DEBUG(\", val=\"); DEBUG(retval); DEBUG(\")\\n\");\n  return retval;\n}\n\n"
  },
  {
    "path": "examples/lock/rfduino/sensor.h",
    "content": "#ifndef _SENSOR_H_\n#define _SENSOR_H_\n\n#include <Arduino.h>\n\n\nclass Sensor {\n  public:\n    Sensor(uint32_t pin_);\n\n    operator int();\n\n  private:\n    const uint32_t pin;\n};\n\n#endif\n\n"
  },
  {
    "path": "examples/readme.md",
    "content": "\r\n# Examples\r\n\r\n\r\nHere's couple of example how to use this plugin. Each example also contains sketches/code for selected BLE enabled microcontrollers.\r\n\r\n<img src=\"../images/examples.jpg\">\r\n\r\n## Humidity and Temperature Sensor [`humidity/`](humidity)\r\n\r\n<img src=\"humidity/images/humidity.jpg\" width=\"50%\">\r\n\r\nTurn a BLE capable microprocessor and a Si7021 humidity and temperature sensor into a wireless HomeKit weather station. Humidity and temperature reading can be displayed in the Home app on your Apple device and used to setup your home automation rules.\r\n\r\n\r\n## Lightbulb [`lightbulb/`](lightbulb)\r\n\r\n<img src=\"lightbulb/images/lightbulb.jpg\" width=\"50%\">\r\n\r\nTurn an LED connected to a BLE capable microprocessor into a wireless HomeKit lightbulb. Use the Home app or Siri on your Apple device to switch it on and off.\r\n\r\n\r\n## Lightbulb RGB [`lightbulb-rgb/`](lightbulb-rgb)\r\n\r\n<img src=\"lightbulb-rgb/images/lightbulb-rgb.jpg\" width=\"50%\">\r\n\r\nTurn three LEDs connected to a BLE capable microprocessor into a wireless HomeKit lightbulb. Use the Home app or Siri on your Apple device to switch it on and change it's brightness or color. BLE subscribe capability allows the microprocessor to sent events back to the HomeKit whenever an external event changes the state of the light.\r\n\r\n\r\n## Lock [`lock/`](lock)\r\n\r\n<img src=\"lock/images/lock.jpg\" width=\"50%\">\r\n\r\nTurn an old Lockitron V1 body connected to a BLE capable microprocessor into a wireless HomeKit lock. Use the Home app or Siri on your Apple device to secure and unsecure the lock.\r\n\r\n\r\n## Switch [`switch/`](switch)\r\n\r\n<img src=\"switch/images/switch.jpg\" width=\"50%\">\r\n\r\nTurn a tactile push button connected to a BLE capable microprocessor into a wireless HomeKit switch. Use the Home app or Siri on your Apple device to trigger events based on the switch state.\r\n\r\n\r\n## Thermometer [`thermometer/`](thermometer)\r\n\r\n<img src=\"thermometer/images/thermometer.jpg\" width=\"50%\">\r\n\r\nTurn a BLE capable microprocessor into a wireless HomeKit thermometer. Temperature reading can be displayed in the Home app on your Apple device.\r\n"
  },
  {
    "path": "examples/switch/arduino101/arduino101.ino",
    "content": "#include <Arduino.h>\n#include <CurieBLE.h>\n\nconst int pinSwitch = 2;\n\n\nBLEPeripheral ble;\nBLEService informationService(\"180A\");\nBLECharacteristic modelCharacteristic(\"2A24\", BLERead, \"101\");\nBLECharacteristic manufacturerCharacteristic(\"2A29\", BLERead, \"Arduino\");\nBLECharacteristic serialNumberCharacteristic(\"2A25\", BLERead, \"2.71828\");\n\nBLEService switchService(\"5ECEC5A0-7F71-41DA-9B8C-6252FE7EFB7E\");\nBLECharCharacteristic onCharacteristic(\"5ECEC5A1-7F71-41DA-9B8C-6252FE7EFB7E\", BLEWrite | BLERead | BLENotify);\nbool lastSwitch = HIGH;\n\n\nvoid setup() {\n  Serial.begin(115200);\n  pinMode(pinSwitch, INPUT_PULLUP);\n\n  ble.setLocalName(\"Switch\");\n  ble.setAdvertisedServiceUuid(switchService.uuid());\n  ble.addAttribute(informationService);\n  ble.addAttribute(modelCharacteristic);\n  ble.addAttribute(manufacturerCharacteristic);\n  ble.addAttribute(serialNumberCharacteristic);\n\n  ble.addAttribute(informationService);\n  ble.addAttribute(modelCharacteristic);\n  ble.addAttribute(manufacturerCharacteristic);\n  ble.addAttribute(serialNumberCharacteristic);\n\n  ble.addAttribute(switchService);\n  ble.addAttribute(onCharacteristic);\n  onCharacteristic.setValueLE(false);\n\n  ble.setEventHandler(BLEConnected, centralConnect);\n  ble.setEventHandler(BLEDisconnected, centralDisconnect);\n  onCharacteristic.setEventHandler(BLEWritten, characteristicWrite);\n\n  ble.begin();\n  Serial.println(\"Bluetooth on\");\n  lastSwitch = digitalRead(pinSwitch);\n}\n\nvoid loop() {\n  ble.poll();\n\n  if ((digitalRead(pinSwitch) == LOW) && (lastSwitch == HIGH)) {\n    bool on = (bool) onCharacteristic.valueLE();\n    onCharacteristic.setValue(!on);\n    Serial.print(\"Switch | \");\n    Serial.println(!on);\n    ble.poll();\n    lastSwitch = LOW;\n    delay(1);\n  } else if ((digitalRead(pinSwitch) == HIGH) && (lastSwitch == LOW)) {\n    lastSwitch = HIGH;\n    delay(1);\n  }\n}\n\n\nvoid centralConnect(BLECentral& central) {\n  Serial.print(\"Central connected | \");\n  Serial.println(central.address());\n}\n\nvoid centralDisconnect(BLECentral& central) {\n  Serial.print(\"Central disconnected | \");\n  Serial.println(central.address());\n}\n\nvoid characteristicWrite(BLECentral& central, BLECharacteristic& characteristic) {\n  Serial.print(\"Characteristic written | \");\n  Serial.println(characteristic.uuid());\n\n  bool on = (bool) onCharacteristic.valueLE();\n  Serial.print(\"Switch | \");\n  Serial.println(on);\n}\n\n"
  },
  {
    "path": "examples/switch/config.json",
    "content": "{\n  \"bridge\": {\n    \"name\": \"Raspberry Pi 3\",\n    \"username\": \"CC:22:3D:E3:CE:30\",\n    \"port\": 51826,\n    \"pin\": \"314-15-926\"\n  },\n  \"description\": \"Raspberry Pi 3 Homebridge-Bluetooth Switch Example\",\n  \"platforms\": [\n    {\n      \"platform\": \"Bluetooth\",\n      \"accessories\": [\n        {\n          \"name\": \"Arduino\",\n          \"address\": \"01:23:45:67:89:AB\",\n          \"services\": [\n            {\n              \"name\": \"Button\",\n              \"type\": \"Switch\",\n              \"UUID\": \"5ECEC5A0-7F71-41DA-9B8C-6252FE7EFB7E\",\n              \"characteristics\": [\n                {\n                  \"type\": \"On\",\n                  \"UUID\": \"5ECEC5A1-7F71-41DA-9B8C-6252FE7EFB7E\"\n                }\n              ]\n            }\n          ]\n        }\n      ]\n    }\n  ]\n}\n"
  },
  {
    "path": "examples/switch/readme.md",
    "content": "\n# Switch\n\n\nTurn a tactile push button connected to a BLE capable microprocessor into a wireless HomeKit switch. Use the Home app or Siri on your Apple device to trigger events based on the switch state.\n\n<img src=\"images/switch.jpg\">\n\nThis example uses [Arduino 101](https://www.arduino.cc/en/Main/ArduinoBoard101) and [Raspberry Pi 3](https://www.raspberrypi.org/). Generally, any programmable BLE peripheral and a box capable of running [Node.js](https://nodejs.org) with [Noble](https://github.com/sandeepmistry/noble) will work.\n\n\n## BLE Peripheral (Arduino 101 or Other BLE Board)\n\nDownload and install the latest version of the [Arduino IDE](https://www.arduino.cc/en/Main/Software). If you're totally new to microcontrollers take some time to go through an introductory tutorial and learn how to make a LED blink. This will help you to understand how to use the IDE, how to upload a sketch and what is the code actually doing.\n\n### Wiring\nConnect the tactile switch to pin 2 and ground. When the button is pushed it connects the pin to the ground. The sketch code activates the internal 10k Ohm pull-up resitor to keep the pin high when the switch isn't pressed.\n\n<img src=\"arduino101/arduino101.png\" width=\"30%\">\n\n**Note** _Alternatively, you can use any of the many BLE boards available on the market ([BlueBean](https://punchthrough.com/bean/), [RedBearLabs BLE Nano](http://redbearlab.com/blenano), ...) as long as you keep UUIDs of the services and characteristics in sync with your `config.json` file, everything will work just fine._\n\n### Running the Sketch\nCompile, run and upload the [arduino101.ino sketch](arduino101/arduino101.ino) using the [Arduino IDE](https://www.arduino.cc/en/Main/Software). The sketch creates a BLE service with a readable, writable and notifiable characteristic for on/off state.\n\n```cpp\nBLEService switchService(\"5ECEC5A0-7F71-41DA-9B8C-6252FE7EFB7E\");\nBLECharCharacteristic onCharacteristic(\"5ECEC5A1-7F71-41DA-9B8C-6252FE7EFB7E\", BLEWrite | BLERead | BLENotify);\n```\n\nTake a look into [this file](https://github.com/KhaosT/HAP-NodeJS/blob/master/lib/gen/HomeKitTypes.js#L1147) to see the full definition of the _On_ characteristic used in the _Switch_ service. Once the BLE central device is setup, it connects to this characteristic and exposes it via Homebridge as a HomeKit accessory of type _Switch_.\n\nLeave the device powered on and the sketch running while you setup the Homebridge server. The sketch has some built-in logging, so keeping the Serial monitor open may be helpful for debugging.\n\n\n## BLE Central & Homebridge Server (Raspberry Pi 3 or Other Compatible Box)\n\nFor help installing an operating system on your new Pi, the official documentation contains a couple of [nice videos](https://www.raspberrypi.org/help/videos/).\n\n### Wiring\nNo wiring except for the micro-USB cable providing power is needed. The Pi needs to be connected to the same router (subnet) as the Apple device you plan to use. It doesn't matter whether via Wifi or Ethernet. Otherwise, you won't be able discover and connect to the Homebridge server running on the Pi.\n\n<img src=\"images/raspberry.png\" width=\"30%\">\n\n**Note** _Alternatively, you can use a Raspberry Pi 2 with a supported USB BLE dongle instead of the Pi 3._\n\n### Running Homebridge\nRunning Homebridge on a Raspberry Pi is straightforward. Follow [this guide](https://github.com/nfarina/homebridge/wiki/Running-HomeBridge-on-a-Raspberry-Pi) to install Homebridge server and then run the following command to install the homebridge-bluetooth plugin:\n\n```sh\n[sudo] npm install -g homebridge-bluetooth\n```\n\nEdit the `~/.homebridge/config.json`, name your Homebridge server and add a new accessory to allow the plugin to connect to the BLE service running on the Arduino:\n\n```js\n\"name\": \"Arduino\",\n\"address\": \"01:23:45:67:89:AB\",\n\"services\": [ {\n    \"name\": \"Button\",\n    \"type\": \"Switch\",\n    \"UUID\": \"5ECEC5A0-7F71-41DA-9B8C-6252FE7EFB7E\",\n    \"characteristics\": [ {\n        \"type\": \"On\",\n        \"UUID\": \"5ECEC5A1-7F71-41DA-9B8C-6252FE7EFB7E\"\n    } ]\n} ]\n```\n\nFinally, start the Homebridge server. If you use Linux you may need to run with higher privileges in order to have access to the BLE hardware layer. See [this link](https://github.com/sandeepmistry/noble#running-without-rootsudo) for more details about running without `sudo`.\n\n```sh\n[sudo] homebridge -D\n```\n\n**Note** _Running with `-D` turns on additional debugging output that is very helpful for getting addresses and UUIDs of your BLE devices that needs to match with the `config.json` file._\n\n<img src=\"images/homebridge.png\">\n\n**Note** _Homebridge server doesn't run only on Linux. MacOS and Windows machines are also supported given they have a built-in BLE adapter or an USB dongle. For more details see supported platforms of [Homebridge](https://github.com/nfarina/homebridge) and [Noble](https://github.com/sandeepmistry/noble)._\n\n\n## Apple Device (iOS 10 or newer)\n\n### Pairing\nOpen Home app and tap the '+' button to add new accessory. When you attempt to add the 'Raspberry Pi 3' bridge, it will ask for a \"PIN\" from the `config.json` file. Once you are paired with your new Rapsberry, Homebridge server all the connected BLE accesories can be added the same way as the bridge.\n\n### Interacting\nOnce your BLE accessory has been added to HomeKit database, besides using the Home app or Control Center at the bottom of the screen, you should be able to tell Siri to control any HomeKit accessory. Try _\"Hey Siri, turn switch off\"_. However, Siri is a cloud service and iOS may need some time to synchronize your HomeKit database to iCloud.\n\n<img src=\"images/ios-home.png\" width=\"30%\">\n<img src=\"images/ios-on.png\" width=\"30%\">\n<img src=\"images/ios-siri.png\" width=\"30%\">\n"
  },
  {
    "path": "examples/thermometer/arduino101/arduino101.ino",
    "content": "#include <Arduino.h>\n#include <CurieBLE.h>\n#include <CurieIMU.h>\n\n\nBLEPeripheral ble;\nBLEService informationService(\"180A\");\nBLECharacteristic modelCharacteristic(\"2A24\", BLERead, \"101\");\nBLECharacteristic manufacturerCharacteristic(\"2A29\", BLERead, \"Arduino\");\nBLECharacteristic serialNumberCharacteristic(\"2A25\", BLERead, \"2.71828\");\n\nBLEService thermometerService(\"1D8A68E0-E68E-4FED-943E-369099F5B499\");\nBLEFloatCharacteristic temperatureCharacteristic(\"1D8A68E1-E68E-4FED-943E-369099F5B499\", BLERead | BLENotify);\n\n\nvoid setup() {\n  Serial.begin(115200);\n\n  ble.setLocalName(\"Thermo\");\n  ble.setAdvertisedServiceUuid(thermometerService.uuid());\n  ble.addAttribute(informationService);\n  ble.addAttribute(modelCharacteristic);\n  ble.addAttribute(manufacturerCharacteristic);\n  ble.addAttribute(serialNumberCharacteristic);\n\n  ble.addAttribute(thermometerService);\n  ble.addAttribute(temperatureCharacteristic);\n  temperatureCharacteristic.setValueLE(0.0);\n\n  ble.setEventHandler(BLEConnected, centralConnect);\n  ble.setEventHandler(BLEDisconnected, centralDisconnect);\n\n  ble.begin();\n  CurieIMU.begin();\n  Serial.println(\"Bluetooth on\");\n}\n\nvoid loop() {\n  ble.poll();\n\n  float currentCelsius = (float) CurieIMU.readTemperature() / 32767.0 + 23.0;\n  static float averageCelsius = currentCelsius;\n  averageCelsius += (currentCelsius - averageCelsius) / 30.0;\n  float previousCelsius = temperatureCharacteristic.valueLE();\n  if (abs(averageCelsius - previousCelsius) > 0.50) {\n    temperatureCharacteristic.setValueLE(currentCelsius);\n    Serial.print(\"Update temperature | \");\n    Serial.println(averageCelsius, 2);\n  } else {\n    Serial.print(\"Temperature | \");\n    Serial.println(averageCelsius, 2);\n  }\n\n  delay(1000);\n}\n\n\nvoid centralConnect(BLECentral& central) {\n  Serial.print(\"Central connected | \");\n  Serial.println(central.address());\n}\n\nvoid centralDisconnect(BLECentral& central) {\n  Serial.print(\"Central disconnected | \");\n  Serial.println(central.address());\n}\n"
  },
  {
    "path": "examples/thermometer/bluefruit/bluefruit.ino",
    "content": "#include <SPI.h>\n#include <Arduino.h>\n#include <Adafruit_BLE.h>\n#include <Adafruit_BLEGatt.h>\n#include <Adafruit_BluefruitLE_SPI.h>\n\n\nAdafruit_BluefruitLE_SPI ble(8, 7, 4); // Firmware > 0.7.0\nAdafruit_BLEGatt gatt(ble);\nint32_t informationService;\nint32_t modelCharacteristic;\nint32_t manufacturerCharacteristic;\nint32_t serialNumberCharacteristic;\n\nint32_t thermometerService;\nint32_t temperatureCharacteristic;\n\n\nunion float_bytes {\n  float value;\n  uint8_t bytes[sizeof(float)];\n};\n\n\nvoid setup(void) {\n  Serial.begin(115200);\n\n  ble.begin(/* true - useful for debugging */);\n  ble.factoryReset();\n  ble.info();\n\n  informationService = gatt.addService(0x180A);\n  char model[] = \"Micro LE\";\n  modelCharacteristic = gatt.addCharacteristic(0x2A24, GATT_CHARS_PROPERTIES_READ,\n                                               sizeof(model)+1, sizeof(model)+1, BLE_DATATYPE_STRING);\n  gatt.setChar(modelCharacteristic, model);\n  char manufacturer[] = \"Bluefruit\";\n  manufacturerCharacteristic = gatt.addCharacteristic(0x2A29, GATT_CHARS_PROPERTIES_READ,\n                                               sizeof(manufacturer), sizeof(manufacturer), BLE_DATATYPE_STRING);\n  gatt.setChar(manufacturerCharacteristic, manufacturer);\n  char serialNumber[] = \"2.71828\";\n  serialNumberCharacteristic = gatt.addCharacteristic(0x2A25, GATT_CHARS_PROPERTIES_READ,\n                                               sizeof(serialNumber), sizeof(serialNumber), BLE_DATATYPE_STRING);\n  gatt.setChar(serialNumberCharacteristic, serialNumber);\n\n  uint8_t thermometerServiceUUID[] = {0x1D,0x8A,0x68,0xE0,0xE6,0x8E,0x4F,0xED,0x94,0x3E,0x36,0x90,0x99,0xF5,0xB4,0x99};\n  thermometerService = gatt.addService(thermometerServiceUUID);\n  uint8_t thermometerCharacteristicUUID[] = {0x1D,0x8A,0x68,0xE1,0xE6,0x8E,0x4F,0xED,0x94,0x3E,0x36,0x90,0x99,0xF5,0xB4,0x99};\n  temperatureCharacteristic = gatt.addCharacteristic(thermometerCharacteristicUUID,\n                                                     GATT_CHARS_PROPERTIES_READ | GATT_CHARS_PROPERTIES_NOTIFY,\n                                                     sizeof(float), sizeof(float), BLE_DATATYPE_BYTEARRAY);\n\n  ble.reset();\n  ble.setConnectCallback(centralConnect);\n  ble.setDisconnectCallback(centralDisconnect);\n  Serial.println(\"Bluetooth on\");\n}\n\n/** Send randomized heart rate data continuously **/\nvoid loop(void) {\n  ble.update();\n\n  static union float_bytes averageCelsius = { .value = 0.0 };\n  if (ble.sendCommandCheckOK(\"AT+HWGETDIETEMP\")) {\n    float currentCelsius = atof(ble.buffer);\n    averageCelsius.value += (currentCelsius - averageCelsius.value) / 30.0;\n  }\n  union float_bytes previousCelsius = { .value = 0.0 };\n  gatt.getChar(temperatureCharacteristic, previousCelsius.bytes, sizeof(previousCelsius));\n\n  if (abs(averageCelsius.value - previousCelsius.value) > 0.50) {\n    gatt.setChar(temperatureCharacteristic, averageCelsius.bytes, sizeof(averageCelsius));\n    Serial.print(\"Update temperature | \");\n    Serial.println(averageCelsius.value);\n  } else {\n    Serial.print(\"Temperature | \");\n    Serial.println(averageCelsius.value);\n  }\n\n  delay(1000);\n}\n\n\nvoid centralConnect(void) {\n  Serial.print(\"Central connected | \");\n  if (ble.sendCommandCheckOK(\"AT+BLEGETPEERADDR\")) {\n    Serial.println(ble.buffer);\n  }\n}\n\nvoid centralDisconnect(void) {\n  Serial.print(\"Central disconnected | \");\n  if (ble.sendCommandCheckOK(\"AT+BLEGETPEERADDR\")) {\n    Serial.println(ble.buffer);\n  }\n}\n"
  },
  {
    "path": "examples/thermometer/config.json",
    "content": "{\n  \"bridge\": {\n    \"name\": \"Raspberry Pi 3\",\n    \"username\": \"CC:22:3D:E3:CE:30\",\n    \"port\": 51826,\n    \"pin\": \"314-15-926\"\n  },\n  \"description\": \"Raspberry Pi 3 Homebridge-Bluetooth Thermometer Example\",\n  \"platforms\": [\n    {\n      \"platform\": \"Bluetooth\",\n      \"accessories\": [\n        {\n          \"name\": \"Arduino\",\n          \"address\": \"01:23:45:67:89:AB\",\n          \"services\": [\n            {\n              \"name\": \"Thermometer\",\n              \"type\": \"TemperatureSensor\",\n              \"UUID\": \"1D8A68E0-E68E-4FED-943E-369099F5B499\",\n              \"characteristics\": [\n                {\n                  \"type\": \"CurrentTemperature\",\n                  \"UUID\": \"1D8A68E1-E68E-4FED-943E-369099F5B499\"\n                }\n              ]\n            }\n          ]\n        }\n      ]\n    }\n  ]\n}\n"
  },
  {
    "path": "examples/thermometer/readme.md",
    "content": "\n# Thermometer\n\n\nTurn a BLE capable microprocessor into a wireless HomeKit thermometer. Temperature reading can be displayed in the Home app on your Apple device.\n\n<img src=\"images/thermometer.jpg\">\n\nThis example uses [Arduino 101](https://www.arduino.cc/en/Main/ArduinoBoard101) or [Bluefruit Micro LE](https://www.adafruit.com/products/2661) and [Raspberry Pi 3](https://www.raspberrypi.org/). Generally, any programmable BLE peripheral and a box capable of running [Node.js](https://nodejs.org) with [Noble](https://github.com/sandeepmistry/noble) will work.\n\n\n## BLE Peripheral (Arduino 101, Bluefruit Micro LE or Other BLE Board)\n\nDownload and install the latest version of the [Arduino IDE](https://www.arduino.cc/en/Main/Software). If you're totally new to microcontrollers take some time to go through an introductory tutorial and learn how to make a LED blink. This will help you to understand how to use the IDE, how to upload a sketch and what is the code actually doing.\n\n### Wiring\nNo wiring is needed, since we use the internal thermometer attached to the IMU or a thermometer inside of the nRF51 chip die in case of the Bluefruit Micro LE.\n\n<img src=\"arduino101/arduino101.png\" width=\"30%\">\n<img src=\"bluefruit/bluefruit.png\" width=\"30%\">\n\n\n**Note** _Alternatively, you can use any of the many BLE boards available on the market ([BlueBean](https://punchthrough.com/bean/), [RedBearLabs BLE Nano](http://redbearlab.com/blenano), ...) as long as you keep UUIDs of the services and characteristics in sync with your `config.json` file, everything will work just fine._\n\n### Running the Sketch\nCompile, run and upload the [arduino101.ino](arduino101/arduino101.ino) or [bluefruit.ino](bluefruit/bluefruit.ino) sketch using the [Arduino IDE](https://www.arduino.cc/en/Main/Software). The sketch creates a BLE service with a readable and notifiable characteristic for the current temperature `float` value.\n\n```cpp\nBLEService thermometerService(\"1D8A68E0-E68E-4FED-943E-369099F5B499\");\nBLEFloatCharacteristic temperatureCharacteristic(\"1D8A68E1-E68E-4FED-943E-369099F5B499\", BLERead | BLENotify);\n```\n\nTake a look into [this file](https://github.com/KhaosT/HAP-NodeJS/blob/master/lib/gen/HomeKitTypes.js#L1147) to see the full definition of the _CurrentTemperature_ characteristic used in the _TemperatureSensor_ service. Once the BLE central device is setup, it connects to this characteristic and exposes it via Homebridge as a HomeKit accessory of type _TemperatureSensor_.\n\nThe code also calculates (pseudo-moving) average to prevent noise in the temperature measurement to trigger frequent mew value notifications. Duration of the averaging window is about 30 s. Once the moving average accumulates change above a certain threshold a new value of the characteristic is set which triggers the notify mechanism and propagates the measurement to HomeKit. The threshold is approximately half of the thermometer accuracy (±1°C).\n\nThe built-ine sensor in fact measures is the temperature if the silicon die, which might be different from the room temperature (usually higher). The die temperature also depends on the load of the processor and might change even when the outside room temperature is stable.\n\nLeave the device powered on and the sketch running while you setup the Homebridge server. The sketch has some built-in logging, so keeping the Serial monitor open may be helpful for debugging.\n\n\n## BLE Central & Homebridge Server (Raspberry Pi 3 or Other Compatible Box)\n\nFor help installing an operating system on your new Pi, the official documentation contains a couple of [nice videos](https://www.raspberrypi.org/help/videos/).\n\n### Wiring\nNo wiring except for the micro-USB cable providing power is needed. The Pi needs to be connected to the same router (subnet) as the Apple device you plan to use. It doesn't matter whether via Wifi or Ethernet. Otherwise, you won't be able discover and connect to the Homebridge server running on the Pi.\n\n<img src=\"images/raspberry.png\" width=\"30%\">\n\n**Note** _Alternatively, you can use a Raspberry Pi 2 with a supported USB BLE dongle instead of the Pi 3._\n\n### Running Homebridge\nRunning Homebridge on a Raspberry Pi is straightforward. Follow [this guide](https://github.com/nfarina/homebridge/wiki/Running-HomeBridge-on-a-Raspberry-Pi) to install Homebridge server and then run the following command to install the homebridge-bluetooth plugin:\n\n```sh\n[sudo] npm install -g homebridge-bluetooth\n```\n\nEdit the `~/.homebridge/config.json`, name your Homebridge server and add a new accessory to allow the plugin to connect to the BLE service running on the Arduino:\n\n```js\n\"name\": \"Arduino\",\n\"address\": \"01:23:45:67:89:AB\",\n\"services\": [\n    \"name\": \"Thermometer\",\n    \"type\": \"TemperatureSensor\",\n    \"UUID\": \"1D8A68E0-E68E-4FED-943E-369099F5B499\",\n    \"characteristics\": [ {\n        \"type\": \"CurrentTemperature\",\n        \"UUID\": \"1D8A68E1-E68E-4FED-943E-369099F5B499\"\n      } ]\n} ]\n```\n\nFinally, start the Homebridge server. If you use Linux you may need to run with higher privileges in order to have access to the BLE hardware layer. See [this link](https://github.com/sandeepmistry/noble#running-without-rootsudo) for more details about running without `sudo`.\n\n```sh\n[sudo] homebridge -D\n```\n\n**Note** _Running with `-D` turns on additional debugging output that is very helpful for getting addresses and UUIDs of your BLE devices that needs to match with the `config.json` file._\n\n<img src=\"images/homebridge.png\">\n\n**Note** _Homebridge server doesn't run only on Linux. MacOS and Windows machines are also supported given they have a built-in BLE adapter or an USB dongle. For more details see supported platforms of [Homebridge](https://github.com/nfarina/homebridge) and [Noble](https://github.com/sandeepmistry/noble)._\n\n\n## Apple Device (iOS 10 or newer)\n\n### Pairing\nOpen Home app and tap the '+' button to add new accessory. When you attempt to add the 'Raspberry Pi 3' bridge, it will ask for a \"PIN\" from the `config.json` file. Once you are paired with your new Rapsberry, Homebridge server all the connected BLE accesories can be added the same way as the bridge.\n\n### Interacting\nOnce your BLE accessory has been added to HomeKit database, besides using the Home app or Control Center at the bottom of the screen, you should be able to tell Siri to get the reading from any HomeKit accessory. Try _\"Hey Siri, what's the temperature of the Arduino?\"_. However, Siri is a cloud service and iOS may need some time to synchronize your HomeKit database to iCloud.\n\n<img src=\"images/ios-home.png\" width=\"30%\">\n<img src=\"images/ios-temperature.png\" width=\"30%\">\n<img src=\"images/ios-siri.png\" width=\"30%\">\n"
  },
  {
    "path": "index.js",
    "content": "var Noble, Accessory, Service, Characteristic, UUIDGen;\r\n\r\nmodule.exports = function (homebridge) {\r\n  console.log(\"Homebridge API version: \" + homebridge.version);\r\n\r\n  Noble = require('noble');\r\n  Accessory = homebridge.platformAccessory;\r\n  Service = homebridge.hap.Service;\r\n  Characteristic = homebridge.hap.Characteristic;\r\n  UUIDGen = homebridge.hap.uuid;\r\n\r\n  BluetoothCharacteristic = require(\"./source/characteristic.js\")(Characteristic);\r\n  BluetoothService = require(\"./source/service.js\")(Service, BluetoothCharacteristic);\r\n  BluetoothAccessory = require(\"./source/accessory.js\")(Accessory, BluetoothService);\r\n  BluetoothPlatform = require(\"./source/platform.js\")(Noble, UUIDGen, Accessory, BluetoothAccessory);\r\n\r\n  homebridge.registerPlatform(\"homebridge-bluetooth\", \"Bluetooth\", BluetoothPlatform, true);\r\n};\r\n"
  },
  {
    "path": "license.txt",
    "content": "MIT License\n\nCopyright (c) 2016 Vojta Molda\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "package.json",
    "content": "{\r\n  \"name\": \"homebridge-bluetooth\",\r\n  \"description\": \"Homebridge plugin that exposes Bluetooth peripherals as HomeKit accessories\",\r\n  \"author\": \"Vojta Molda\",\r\n  \"version\": \"0.1.7\",\r\n  \"license\": \"MIT\",\r\n  \"keywords\": [\r\n    \"homebridge-plugin\",\r\n    \"bluetooth\",\r\n    \"bluetooth low energy\"\r\n  ],\r\n  \"repository\": {\r\n    \"type\": \"git\",\r\n    \"url\": \"git://github.com/vojtamolda/homebridge-bluetooth.git\"\r\n  },\r\n  \"bugs\": {\r\n    \"url\": \"https://github.com/vojtamolda/homebridge-bluetooth/issues\"\r\n  },\r\n  \"engines\": {\r\n    \"node\": \">=4.3.2\",\r\n    \"homebridge\": \">=0.4.6\"\r\n  },\r\n  \"dependencies\": {\r\n    \"noble\": \">=1.7.0\",\r\n    \"chalk\": \">=1.1.1\"\r\n  }\r\n}\r\n"
  },
  {
    "path": "readme.md",
    "content": "\r\n# homebridge-bluetooth\r\n\r\n\r\n[![NPM version](https://badge.fury.io/js/homebridge-bluetooth.svg)](https://badge.fury.io/js/homebridge-bluetooth)\r\n\r\n[Homebridge](https://github.com/nfarina/homebridge) plugin for exposing services and\r\ncharacteristics of nearby [Bluetooth Low Energy](https://www.bluetooth.com/what-is-bluetooth-technology/bluetooth-technology-basics/low-energy) (BLE) peripherals as [HomeKit](https://www.apple.com/ios/home/) accesories. Ideal for wireless DIY home automation projects if you'd like to control them comfortably with Siri on any Apple device.\r\n\r\n<img src=\"images/overview.jpg\">\r\n\r\nHomebridge runs on top of [Node.js](https://nodejs.org) server and is an open-source implementation of the Apple HomeKit protocol. HomeKit provides the API between your Apple device (i.e. Watch) and your home automation server (i.e. Raspberry Pi). This Homebridge [plugin](https://www.npmjs.com/package/homebridge-bluetooth) relays the communication from the home automation server to the BLE peripheral device (i.e. Arduino 101). Take a peek into the [examples](/examples/) folder for inspiration.\r\n\r\n\r\n\r\n## Installation\r\n\r\nMake sure your systems matches the [prerequisites](#what-are-the-prerequisites-for-installation). You need to have a C compiler, [Node.js](https://nodejs.org) server and if you're running on Linux the [`libbluez-dev`](http://www.bluez.org/download/) library.\r\n\r\n### Install Homebridge & Noble\r\n[Homebridge](https://github.com/nfarina/homebridge) is a lightweight framework built on top of [Node.js](https://nodejs.org/) server that provides the HomeKit bridge for your Apple devices to connect to. [Noble](https://github.com/sandeepmistry/noble) is BLE central module library for [Node.js](https://nodejs.org/) that abstracts away intricacies of each OS BLE stack implementation and provides a nice universal high-level API.\r\n\r\n```sh\r\n[sudo] npm install -g noble\r\n[sudo] npm install -g --unsafe-perm homebridge node-gyp\r\n[sudo] npm install -g homebridge-bluetooth\r\n```\r\n\r\n**Note** _Depending on your privileges `-g` flag may need root permissions to install to the global `npm` module directory._\r\n\r\n### Configure Homebridge\r\nHomebridge is setup via `config.json` file sitting in the `~/.homebridge/` directory. The [example config](config.json) included in the repository has lots of comments and is a good starting point. Each BLE peripheral device is uniquely identified by it's address. Services and characteristics are identified by UUID. Also, each of the [examples](/examples/) comes with it's own `config.json` file.\r\n\r\nThe easiest way to find the address of a BLE device is to start the plugin with a random/default address and then check the output for `Ignored | MyDevice - 01:23:45:67:89:ab` message. Alternatively you can run `[sudo] hcitool lescan` to discover available BLE devices.\r\n\r\nMapping of services and characteristics from Bluetooth to HomeKit relies on two things - matching read/write/nofity permissions and matching data type. To see what is available, take a look at the very long list [here](https://github.com/KhaosT/HAP-NodeJS/blob/master/lib/gen/HomeKitTypes.js). Services are towards the bottom of the file. Each characteristic has pre-defined permissions that represent the expected way to use it - i.e. it doesn't make sense to write (set) the current temperature. These permissions must match the corresponding permissions of the Bluetooth characteristic. All data are assumed to use little endian encoding for multi-byte values.\r\n\r\nThe following table summarizes permission matching for a very popular [BLEPeripheral](https://github.com/sandeepmistry/arduino-BLEPeripheral) library that can run on most Arduino boards:\r\n\r\n| HomeKit `Characteristic.Perms[...]` | BLEPeripheral `BLECharacteristic(...)` |\r\n| :---------------------------------- | :------------------------------------- |\r\n| `READ`                              | `BLEWrite`                             |\r\n| `WRITE`                             | `BLERead`                              |\r\n| `NOTIFY`                            | `BLENotify`                            |\r\n\r\nSimilar to permissions, matching of the exchanged data type for [BLEPeripheral](https://github.com/sandeepmistry/arduino-BLEPeripheral) is summarized here:\r\n\r\n| HomeKit `Characteristic.Formats[...]` | BLEPeripheral `BLETypedCharacteristic<...>` |\r\n| :------------------------------------ | :------------------------------------------ |\r\n| `BOOL`                                | `BLECharCharacteristic`                     |\r\n| `INT`                                 | `BLEIntCharacteristic`                      |\r\n| `FLOAT`                               | `BLEFloatCharacteristic`                    |\r\n| `STRING`                              | `BLECharacteristic`                         |\r\n| `UINT8`                               | `BLEUnsignedCharCharacteristic`             |\r\n| `UINT16`                              | `BLEUnsignedShortCharacteristic`            |\r\n| `UINT32`                              | `BLEUnsignedIntCharacteristic`              |\r\n| `UINT64`                              | `BLEUnsignedLongCharacteristic`             |\r\n\r\nFor instance if you'd like create a HomeKit thermometer, you have to implement the `TemperatureSensor` service. According to the [list of available services and characteristics]() the service has one mandatory characteristic - `CurrentTemperature` and a handful of optional ones.\r\n\r\nThe `CurrentTemperature` characteristic communicates a `FLOAT` value and needs `READ` and `NOTIFY` permissions. Using the [BLEPeripheral](https://github.com/sandeepmistry/arduino-BLEPeripheral) library, the characteristic would be implemented as:\r\n\r\n```cpp\r\nBLEService temperatureSensorService(\"SERVICE-UUID-HERE\");\r\nBLEFloatCharacteristic currentTemperatureCharacteristic(\"CHARACTERISTIC-UUID-HERE\", BLERead | BLENotify);\r\n```\r\n\r\nThe corresponding entry in the `config.json` file that connects to the characteristic above is:\r\n\r\n```js\r\n\"services\" : [ {\r\n    \"name\": \"The Best HomeKit Thermometer\",\r\n    \"type\": \"TemperatureSensor\",\r\n    \"UUID\": \"SERVICE-UUID-HERE\",\r\n    \"characteristics\": [ {\r\n        \"type\": \"CurrentTemperature\",\r\n        \"UUID\": \"CHARACTERISTIC-UUID-HERE\"\r\n    } ]\r\n} ]\r\n```\r\n\r\n**Note** _All [UUIDs](https://en.wikipedia.org/wiki/Universally_unique_identifier) should be randomly generated to prevent collisions. [This page](https://www.uuidgenerator.net) is a good place to get your own._\r\n\r\n### Run Homebridge\r\nDepending on your privileges, accessing the BLE kernel subsystem may need root permissions.\r\n\r\n```sh\r\n[sudo] homebridge -D\r\n```\r\n\r\n**Note** _Running with `-D` turns on additional debugging output that is very helpful for getting addresses and UUIDs of your BLE devices that needs to match with the `config.json` file._\r\n\r\n**Note** _See [this section of Noble readme](https://github.com/sandeepmistry/noble#running-without-rootsudo) for more details about running without `sudo`._\r\n\r\n\r\n\r\n## Troubleshooting\r\n\r\nIf you encouter a different problem, please, open an [issue](https://github.com/vojtamolda/homebridge-bluetooth/issues).\r\n\r\n### Home app can't discover any nearby accessories\r\nMake sure the Apple device and the Homebridge server are on the same subnet and connected to the same wifi router.\r\n\r\nSometimes, homebridge server might think that, it has successfully paired with iOS, but iOS doesn't agree. Try to delete the `persist/` directory in the `~/.homebridge/` configuration folder. This removes all pairings that normally persist from session to session.\r\n\r\n```sh\r\nrm -rf ~/.homebridge/persist/\r\n```\r\n\r\nFrom time to time it looks like iOS ignores HomeKit bridges with `username` that it has already paired with. Try to change the `username` in the `bridge` section of `config.json` to a new value never used before.\r\n\r\n```js\r\n\"username\": \"CC:22:3D:E3:CE:30\"  ->  \"username\": \"DD:33:4E:F4:DF:41\"\r\n```\r\n\r\n### BLE peripheral is discovered, but immediately disconnects\r\nThis isssue seems to be happening on some versions of Raspbian running on the Pi 3. Resetting the BLE adapter seems to resolve the issue:\r\n\r\n```sh\r\n[sudo] hciconfig hci0 reset\r\n```\r\n\r\nObviously, the solution is not really addressing the core of the problem, but it seems to help.\r\n\r\n\r\n\r\n## FAQ\r\n\r\n### Can I contribute my own example or a new feature?\r\nSure thing! All contributions are welcome. Just do a pull-request or open a new issue if you see something broken.\r\n\r\n\r\n### Is this thing secure?\r\n**No.** Not even close. Connection from your Apple device to Homebridge server is encrypted. However, all BLE communication is currently unencrypted and anyone with the right spoofing equipment can listen to it. Moreover, once the attacker has figured out what devices you have, he can also connect to any of your peripherals and control them directly. So don't use this if you're paranoid or if NSA is after you. You wouldn't sleep well.\r\n\r\n[MFi](https://developer.apple.com/programs/mfi/) certified HomeKit BLE encryption uses quite-strong Ed25519 elliptic cypher. BLE has built-in support for encryption, but it seems that Apple has decided to build their own thing as usual. It makes some sense in this case since a lot is at stake - once HomeKit becomes widespread a security bug literally means open doors to your house. Hooray - let's connect billions of unsecured IoT devices to the internet! What could possibly go wrong??\r\n\r\nMoreover, from bits and pieces available on the Internet, it seems that Apple has changed the specs several times and caused a lot of trouble for the manufacturers, since slower microprocessors tend to have a hard time doing all the involved encryption math. Initial pairing can take literally minutes. Pairing procedure uses SRP (Secure Remote Password (3072-bit) protocol with an 8-digit code (the number you have to type in when first pairing with Homebridge). After pairing, per session communication always uses unique keys derived by HKDF-SHA-512 and encrypted by the ChaCha20-Poly1305.\r\n\r\nTheoretically, one should be able to get rid of the Homebridge 'middle-man' since HomeKit over BLE allows direct connection to any Apple device. While there are many good [HomeKit IP stacks around](https://github.com/KhaosT/HAP-NodeJS) BLE implementations are few and far between. There's only one implementation I'm aware of [here](https://github.com/aanon4/HomeKit), but it can't be easily ported to other boards.\r\n\r\nBTW, I think it might be possible to re-write the BLE implementation above with [BLEPeripheral](https://github.com/sandeepmistry/arduino-BLEPeripheral) library instead of Nordic Semi's SoftDevice to make it run essentially everywhere. If anyone is interested in this project, please, let me know and maybe we can figure a plan and come up with something useful and fun to use.\r\n\r\nImplementing a HomeKit over BLE stack correctly requires access to [MFi](https://developer.apple.com/programs/mfi/) internal documentation, which isn't publicly available, unless you're a registered developer at a company with big $$$. Making BLE accessories is simple, but making them secure seems to be very, very hard.\r\n\r\n\r\n### What are the prerequisites for installation?\r\n\r\n#### Linux (Debian Based, Kernel 3.6 or newer)\r\nA supported  BLE (Bluetooth 4.0) USB dongle is required, if your device doesn't have it built-in.\r\n\r\n - Install [Node.js](https://nodejs.org/en/download/)\r\n\r\n   [Node.js](https://nodejs.org) is an asynchronous event driven JavaScript server, ideal for building scalable, low-latency network applications. [Homebridge](https://www.npmjs.com/package/homebridge) is built on top of this server. It is being developed so quickly that package repositories of most distributions contain a very old version. Getting latest from the official website is recommended.\r\n\r\n - Install `libbluetooth-dev` and `libavahi-compat-libdnssd-dev`\r\n\r\n   These libraries and their dependencies are required by [Noble](https://www.npmjs.com/package/noble) package and provide access to the kernel Bluetooth subsystem.\r\n\r\n   ```sh\r\n   sudo apt-get install bluetooth bluez libbluetooth-dev libudev-dev libavahi-compat-libdnssd-dev\r\n   ```\r\n\r\n#### macOS (10.10 or newer)\r\nCheck [this link](http://www.imore.com/how-tell-if-your-mac-has-bluetooth-40) to see if your mac has built-in BLE (Bluetooth 4.0) support. All macs from 2012 and newer are generally fine.\r\n\r\n - Install [Node.js](https://nodejs.org/en/download/)\r\n\r\n   [Node.js](https://nodejs.org) is an asynchronous event driven JavaScript server, ideal for building scalable, low-latency network applications. [Homebridge](https://www.npmjs.com/package/homebridge) is built on top of this server. It is being developed so quickly that package repositories of most distributions contain a very old version. Getting latest from the official website is recommended.\r\n\r\n - Install [XCode](https://itunes.apple.com/ca/app/xcode/id497799835?mt=12)\r\n\r\n   [XCode](https://developer.apple.com/xcode/) comes with a C compiler that is needed to compile the JavaScript to C bindings required by [Noble](https://www.npmjs.com/package/noble) package.\r\n\r\n#### Windows (8.1 or newer)\r\nPull request is welcomed here... Both [Homebridge](https://www.npmjs.com/package/homebridge) and [Noble](https://www.npmjs.com/package/noble) should run on Windows, but I don't have a machine to test.\r\n\r\n\r\n### On what devices was this plugin tested?\r\nHere's a list of testing devices. The list is by no means exhaustive and the plugin will work with many more.\r\n- Apple Device\r\n  - [iPhone](https://en.wikipedia.org/wiki/IPhone) 5S & 6 running [iOS](https://en.wikipedia.org/wiki/IOS) 10\r\n\r\n- Homebridge Server\r\n  - [Raspberry Pi](https://en.wikipedia.org/wiki/Raspberry_Pi) 3 & 2 (with USB dongle) running [Raspbian](https://www.raspberrypi.org/downloads/raspbian/)  Jessie Lite\r\n  - [Macbook Air](https://en.wikipedia.org/wiki/MacBook_Air) (2015) & [iMac](https://en.wikipedia.org/wiki/IMac) (2012) running [macOS](https://en.wikipedia.org/wiki/MacOS) 10.12\r\n\r\n- Bluetooth Peripheral\r\n  - nRF51 Based Boards\r\n    - [Arduino 101](https://www.arduino.cc/en/Main/ArduinoBoard101), [RFDuino](http://www.rfduino.com/), [Bluefruit Micro](https://www.adafruit.com/product/2661)\r\n  - nRF8001 Based Boards\r\n    - [Arduino UNO](https://www.arduino.cc/en/Main/ArduinoBoardUno) + [nRF8001 Breakout](https://www.adafruit.com/products/1697),\r\n\r\n\r\n## License\r\n\r\nThis work is licensed under the MIT license. See [license](license.txt) for more details.\r\n"
  },
  {
    "path": "source/accessory.js",
    "content": "var Accessory, BluetoothService;\r\nvar Chalk = require('chalk');\r\n\r\nmodule.exports = function (accessory, bluetoothService) {\r\n  Accessory = accessory;\r\n  BluetoothService = bluetoothService;\r\n\r\n  return BluetoothAccessory;\r\n};\r\n\r\n\r\nfunction BluetoothAccessory(log, config) {\r\n  this.log = log;\r\n\r\n  if (!config.name) {\r\n    throw new Error(\"Missing mandatory config 'name'\");\r\n  }\r\n  this.name = config.name;\r\n  this.prefix = Chalk.blue(\"[\" + config.name + \"]\");\r\n\r\n  if (!config.address) {\r\n    throw new Error(this.prefix + \" Missing mandatory config 'address'\");\r\n  }\r\n  this.address = config.address;\r\n\r\n  if (!config.services || !(config.services instanceof Array)) {\r\n    throw new Error(this.prefix + \" Missing mandatory config 'services'\");\r\n  }\r\n\r\n  this.log.debug(this.prefix, \"Initialized | \" + this.name + \" (\" + this.address + \")\");\r\n  this.bluetoothServices = {};\r\n  for (var serviceConfig of config.services) {\r\n    var serviceUUID = trimUUID(serviceConfig.UUID);\r\n    this.bluetoothServices[serviceUUID] = new BluetoothService(this.log, serviceConfig,\r\n                                                               this.prefix);\r\n  }\r\n\r\n  var informationServiceUUID = trimUUID('180A')\r\n  if (!(informationServiceUUID in this.bluetoothServices)) {\r\n    informationServiceConfig = {\r\n      \"name\": \"Information\",\r\n      \"type\": \"AccessoryInformation\",\r\n      \"UUID\": \"180A\",\r\n      \"characteristics\": [\r\n        {\"type\": \"Manufacturer\", \"UUID\": \"2A29\"},\r\n        {\"type\": \"Model\", \"UUID\": \"2A24\"},\r\n        {\"type\": \"SerialNumber\", \"UUID\": \"2A25\"}\r\n      ]\r\n    };\r\n    this.bluetoothServices[informationServiceUUID]\r\n        = new BluetoothService(this.log, informationServiceConfig, this.prefix);\r\n  }\r\n\r\n  this.homebridgeAccessory = null;\r\n  this.nobleAccessory = null;\r\n}\r\n\r\n\r\nBluetoothAccessory.prototype.connect = function (nobleAccessory, homebridgeAccessory) {\r\n  this.log.info(this.prefix, \"Connected | \" + this.name + \" (\" + this.address + \")\");\r\n  this.homebridgeAccessory = homebridgeAccessory;\r\n  this.homebridgeAccessory.on('identify', this.identification.bind(this));\r\n  this.homebridgeAccessory.updateReachability(true);\r\n\r\n  this.nobleAccessory = nobleAccessory;\r\n  this.nobleAccessory.once('disconnect', this.disconnect.bind(this));\r\n  this.nobleAccessory.discoverServices([], this.discoverServices.bind(this));\r\n};\r\n\r\n\r\nBluetoothAccessory.prototype.discoverServices = function (error, nobleServices) {\r\n  if (error) {\r\n    this.log.error(this.prefix, \"Discover services failed | \" + error);\r\n    return;\r\n  }\r\n  if (nobleServices.length == 0) {\r\n    this.log.warn(this.prefix, \"No services discovered\");\r\n    return;\r\n  }\r\n\r\n  for (var nobleService of nobleServices) {\r\n    var serviceUUID = trimUUID(nobleService.uuid);\r\n    var bluetoothService = this.bluetoothServices[serviceUUID];\r\n    if (!bluetoothService) {\r\n      if (nobleService.uuid != '1800' && nobleService.uuid != '1801') {\r\n        this.log.debug(this.prefix, \"Ignored | Service (\" + nobleService.uuid + \")\");\r\n      }\r\n      continue;\r\n    }\r\n\r\n    var homebridgeService = this.homebridgeAccessory.getService(bluetoothService.class);\r\n    if (!homebridgeService) {\r\n      homebridgeService = this.homebridgeAccessory.addService(bluetoothService.class,\r\n                                                              bluetoothService.name);\r\n    }\r\n    bluetoothService.connect(nobleService, homebridgeService);\r\n  }\r\n};\r\n\r\n\r\nBluetoothAccessory.prototype.identification = function (paired, callback) {\r\n  this.log.info(this.prefix, \"Identify\");\r\n  callback();\r\n};\r\n\r\n\r\nBluetoothAccessory.prototype.disconnect = function (error) {\r\n  if (error) {\r\n    this.log.error(\"Disconnecting failed | \" + this.name + \" (\" + this.address + \") | \" + error);\r\n  }\r\n\r\n  for (var serviceUUID in this.bluetoothServices) {\r\n    this.bluetoothServices[serviceUUID].disconnect();\r\n  }\r\n  if (this.nobleAccessory && this.homebridgeAccessory) {\r\n    this.homebridgeAccessory.removeAllListeners('identify');\r\n    this.homebridgeAccessory.updateReachability(false);\r\n    this.homebridgeAccessory = null;\r\n    this.nobleAccessory.removeAllListeners();\r\n    this.nobleAccessory = null;\r\n    this.log.info(this.prefix, \"Disconnected\");\r\n  }\r\n};\r\n\r\n\r\nfunction trimUUID(uuid) {\r\n  return uuid.toLowerCase().replace(/:/g, \"\").replace(/-/g, \"\");\r\n}\r\n"
  },
  {
    "path": "source/characteristic.js",
    "content": "var Characteristic;\r\nvar Chalk = require('chalk');\r\n\r\nmodule.exports = function (characteristic) {\r\n  Characteristic = characteristic;\r\n\r\n  return BluetoothCharacteristic;\r\n};\r\n\r\n\r\nfunction BluetoothCharacteristic(log, config, prefix) {\r\n  this.log = log;\r\n\r\n   if (!config.type) {\r\n    throw new Error(this.prefix + \" Missing mandatory config 'type'\");\r\n  }\r\n  this.type = config.type;\r\n  this.prefix = prefix + \" \" + Chalk.green(\"[\" + this.type + \"]\");\r\n  if (!Characteristic[this.type]) {\r\n    throw new Error(this.prefix + \" Characteristic type '\" + this.type + \"' is not defined. \" +\r\n                    \"See 'HAP-NodeJS/lib/gen/HomeKitType.js' for options.\")\r\n  }\r\n  this.class = Characteristic[this.type]; // For example - Characteristic.Brightness\r\n\r\n  if (!config.UUID) {\r\n    throw new Error(this.prefix + \" Missing mandatory config 'UUID'\");\r\n  }\r\n  this.UUID = config.UUID;\r\n\r\n  this.log.debug(this.prefix, \"Initialized | Characteristic.\" + this.type + \" (\" + this.UUID + \")\");\r\n\r\n  this.homebridgeCharacteristic = null;\r\n  this.nobleCharacteristic = null;\r\n}\r\n\r\n\r\nBluetoothCharacteristic.prototype.connect = function (nobleCharacteristic, homebridgeCharacteristic) {\r\n  this.log.info(this.prefix, \"Connected\");\r\n  this.log.debug(this.prefix, \"Characteristic.\" + this.type + \" (\" + this.UUID + \")\");\r\n  this.homebridgeCharacteristic = homebridgeCharacteristic;\r\n\r\n  this.nobleCharacteristic = nobleCharacteristic;\r\n  for (var permission of this.homebridgeCharacteristic.props['perms']) {\r\n    switch (permission) {\r\n      case Characteristic.Perms.READ:\r\n        if (this.nobleCharacteristic.properties.indexOf('read') >= 0) {\r\n          this.homebridgeCharacteristic.on('get', this.get.bind(this));\r\n        } else {\r\n          this.log.warn(this.prefix, \"Read from bluetooth characteristic not permitted\");\r\n        }\r\n        break;\r\n      case Characteristic.Perms.WRITE:\r\n        if (this.nobleCharacteristic.properties.indexOf('write') >= 0) {\r\n          this.homebridgeCharacteristic.on('set', this.set.bind(this));\r\n        } else {\r\n          this.log.warn(this.prefix, \"Write to bluetooth characteristic not permitted\");\r\n        }\r\n        break;\r\n      case Characteristic.Perms.NOTIFY:\r\n        if (this.nobleCharacteristic.properties.indexOf('notify') >= 0) {\r\n          this.nobleCharacteristic.on('read', this.notify.bind(this));\r\n          this.nobleCharacteristic.subscribe(function (error) {\r\n            if (error) {\r\n              this.log.warn(this.prefix, \"Subscribe to bluetooth characteristic failed\");\r\n            }\r\n          }.bind(this));\r\n        } else {\r\n          this.log.warn(this.prefix, \"Subscribe to bluetooth characteristic not permitted\");\r\n        }\r\n        break;\r\n    }\r\n  }\r\n};\r\n\r\n\r\nBluetoothCharacteristic.prototype.get = function (callback) {\r\n  this.nobleCharacteristic.read(function (error, buffer) {\r\n    if (error) {\r\n      this.log.warn(this.prefix, \"Read from bluetooth characteristic failed | \" + error);\r\n      callback(error, null);\r\n      return\r\n    }\r\n    var value = this.fromBuffer(buffer);\r\n    this.log.info(this.prefix, \"Get | \" + value);\r\n    callback(null, value);\r\n  }.bind(this));\r\n};\r\n\r\n\r\nBluetoothCharacteristic.prototype.set = function (value, callback) {\r\n  this.log.info(this.prefix, \"Set | \" + value);\r\n  var buffer = this.toBuffer(value);\r\n  this.nobleCharacteristic.write(buffer, false);\r\n  callback();\r\n};\r\n\r\n\r\nBluetoothCharacteristic.prototype.notify = function (buffer, notification) {\r\n  if (notification) {\r\n    var value = this.fromBuffer(buffer);\r\n    this.log.info(this.prefix, \"Notify | \" + value);\r\n    this.homebridgeCharacteristic.updateValue(value, null, this);\r\n  }\r\n};\r\n\r\n\r\nBluetoothCharacteristic.prototype.toBuffer = function (value) {\r\n  var buffer;\r\n  switch (this.homebridgeCharacteristic.props['format']) {\r\n    case Characteristic.Formats.BOOL: // BLECharCharacteristic\r\n      buffer = Buffer.alloc(1);\r\n      buffer.writeInt8(value ? 1 : 0, 0);\r\n      break;\r\n    case Characteristic.Formats.INT: // BLEIntCharacteristic\r\n      buffer = Buffer.alloc(4);\r\n      buffer.writeInt32LE(value, 0);\r\n      break;\r\n    case Characteristic.Formats.FLOAT: // BLEFloatCharacteristic\r\n      buffer = Buffer.alloc(4);\r\n      buffer.writeFloatLE(value, 0);\r\n      break;\r\n    case Characteristic.Formats.STRING: // BLECharacteristic\r\n      buffer = Buffer.from(value, 'utf8');\r\n      break;\r\n    case Characteristic.Formats.UINT8: // BLEUnsignedCharCharacteristic\r\n      buffer = Buffer.alloc(1);\r\n      buffer.writeUInt8(value, 0);\r\n      break;\r\n    case Characteristic.Formats.UINT16: // BLEUnsignedShortCharacteristic\r\n      buffer = Buffer.alloc(2);\r\n      buffer.writeUInt16(value, 0);\r\n      break;\r\n    case Characteristic.Formats.UINT32: // BLEUnsignedIntCharacteristic\r\n      buffer = Buffer.alloc(4);\r\n      buffer.writeUInt32(value, 0);\r\n      break;\r\n    case Characteristic.Formats.UINT64: // BLEUnsignedLongCharacteristic\r\n      buffer = Buffer.alloc(8);\r\n      buffer.writeUIntLE(value, 0, 8);\r\n      break;\r\n    default:\r\n      this.log.error(this.prefix, \"Unsupported data conversion | \" +\r\n                     this.homebridgeCharacteristic.props['format']);\r\n      buffer = Buffer.alloc(1);\r\n      buffer.writeInt8(0, 0);\r\n      break;\r\n  }\r\n  return buffer;\r\n};\r\n\r\n\r\nBluetoothCharacteristic.prototype.fromBuffer = function (buffer) {\r\n  var value;\r\n  switch (this.homebridgeCharacteristic.props['format']) {\r\n    case Characteristic.Formats.BOOL: // BLECharCharacteristic\r\n      value = buffer.readInt8(0);\r\n      break;\r\n    case Characteristic.Formats.INT: // BLEIntCharacteristic\r\n      value = buffer.readInt32LE(0);\r\n      break;\r\n    case Characteristic.Formats.FLOAT: // BLEFloatCharacteristic\r\n      value = buffer.readFloatLE(0);\r\n      break;\r\n    case Characteristic.Formats.STRING: // BLECharacteristic\r\n      value = buffer.toString('utf8', 0);\r\n      break;\r\n    case Characteristic.Formats.UINT8: // BLEUnsignedCharCharacteristic\r\n      value = buffer.readUInt8(0);\r\n      break;\r\n    case Characteristic.Formats.UINT16: // BLEUnsignedShortCharacteristic\r\n      value = buffer.readUInt16LE(0);\r\n      break;\r\n    case Characteristic.Formats.UINT32: // BLEUnsignedIntCharacteristic\r\n      value = buffer.readUInt32LE(0);\r\n      break;\r\n    case Characteristic.Formats.UINT64: // BLEUnsignedLongCharacteristic\r\n      value = buffer.readUIntLE(0, 8);\r\n      break;\r\n    default:\r\n      value = 0;\r\n      this.log.error(this.prefix, \"Unsupported data conversion | \" +\r\n                     this.homebridgeCharacteristic.props['format']);\r\n  }\r\n  return value;\r\n};\r\n\r\n\r\nBluetoothCharacteristic.prototype.disconnect = function () {\r\n  if (this.nobleCharacteristic && this.homebridgeCharacteristic) {\r\n    if (this.nobleCharacteristic.properties.indexOf('read') >= 0) {\r\n      this.homebridgeCharacteristic.removeAllListeners('get');\r\n    }\r\n    if (this.nobleCharacteristic.properties.indexOf('write') >= 0) {\r\n      this.homebridgeCharacteristic.removeAllListeners('set');\r\n    }\r\n    if (this.nobleCharacteristic.properties.indexOf('notify') >= 0) {\r\n      this.nobleCharacteristic.unsubscribe(null);\r\n      this.nobleCharacteristic.removeAllListeners('read');\r\n    }\r\n    this.homebridgeCharacteristic = null;\r\n    this.nobleCharacteristic = null;\r\n    this.log.info(this.prefix, \"Disconnected\");\r\n  }\r\n};\r\n"
  },
  {
    "path": "source/platform.js",
    "content": "var Noble, UUIDGen, Accessory, BluetoothAccessory;\r\n\r\nmodule.exports = function (noble, uuidGen, accessory, bluetoothAccessory) {\r\n  Noble = noble;\r\n  UUIDGen = uuidGen\r\n  Accessory = accessory;\r\n  BluetoothAccessory = bluetoothAccessory;\r\n\r\n  return BluetoothPlatform;\r\n};\r\n\r\n\r\nfunction BluetoothPlatform(log, config, homebridgeAPI) {\r\n  this.log = log;\r\n\r\n  if (!config) {\r\n    this.log.warn(\"Missing mandatory platform config named 'Bluetooth'\");\r\n    return;\r\n  }\r\n\r\n  if (!config.accessories || !(config.accessories instanceof Array)) {\r\n    this.log.warn(\"Missing mandatory config 'accessories'\");\r\n    return;\r\n  }\r\n  this.bluetoothAccessories = {};\r\n  for (var accessoryConfig of config.accessories) {\r\n    var accessoryAddress = trimAddress(accessoryConfig.address);\r\n    var bluetoothAccessory = new BluetoothAccessory(this.log, accessoryConfig);\r\n    this.bluetoothAccessories[accessoryAddress] = bluetoothAccessory;\r\n  }\r\n  this.cachedHomebridgeAccessories = {};\r\n\r\n  this.homebridgeAPI = homebridgeAPI;\r\n  this.homebridgeAPI.on('didFinishLaunching', this.didFinishLaunching.bind(this));\r\n}\r\n\r\n\r\nBluetoothPlatform.prototype.configureAccessory = function (homebridgeAccessory) {\r\n  var accessoryAddress = homebridgeAccessory.context['address'];\r\n  var bluetoothAccessory = this.bluetoothAccessories[accessoryAddress];\r\n  if (!bluetoothAccessory) {\r\n    this.log.debug(\"Removed | \" + homebridgeAccessory.displayName + \" (\" + accessoryAddress + \")\");\r\n    this.homebridgeAPI.unregisterPlatformAccessories(\"homebridge-bluetooth\", \"Bluetooth\",\r\n                                                     [homebridgeAccessory]);\r\n    return;\r\n  }\r\n\r\n  this.log.debug(\"Persist | \" + homebridgeAccessory.displayName + \" (\" + accessoryAddress + \")\");\r\n  this.cachedHomebridgeAccessories[accessoryAddress] = homebridgeAccessory;\r\n};\r\n\r\n\r\nBluetoothPlatform.prototype.didFinishLaunching = function () {\r\n  Noble.on('stateChange', this.stateChange.bind(this));\r\n};\r\n\r\n\r\nBluetoothPlatform.prototype.stateChange = function (state) {\r\n  if (state != 'poweredOn') {\r\n    this.log.info(\"Stopped | \" + state);\r\n    Noble.stopScanning();\r\n  }\r\n\r\n  this.log.info(\"Started | \" + state);\r\n  Noble.startScanning([], false);\r\n  Noble.on('discover', this.discover.bind(this));\r\n};\r\n\r\n\r\nBluetoothPlatform.prototype.discover = function (nobleAccessory) {\r\n  var accessoryAddress = trimAddress(nobleAccessory.address);\r\n  var bluetoothAccessory = this.bluetoothAccessories[accessoryAddress];\r\n  if (!bluetoothAccessory) {\r\n    this.log.debug(\"Ignored | \" + nobleAccessory.advertisement.localName +\r\n                  \" (\" + nobleAccessory.address + \") | RSSI \" + nobleAccessory.rssi + \"dB\");\r\n    return;\r\n  }\r\n\r\n  this.log.debug(\"Discovered | \" + nobleAccessory.advertisement.localName +\r\n                \" (\" + nobleAccessory.address + \") | RSSI \" + nobleAccessory.rssi + \"dB\");\r\n  nobleAccessory.connect(function (error) {\r\n    this.connect(error, nobleAccessory)\r\n  }.bind(this));\r\n};\r\n\r\n\r\nBluetoothPlatform.prototype.connect = function (error, nobleAccessory) {\r\n  if (error) {\r\n    this.log.error(\"Connecting failed | \" + nobleAccessory.advertisement.localName +\r\n                   \" (\" + nobleAccessory.address + \") | \" + error);\r\n    return;\r\n  }\r\n\r\n  var accessoryAddress = trimAddress(nobleAccessory.address);\r\n  var bluetoothAccessory = this.bluetoothAccessories[accessoryAddress];\r\n  var homebridgeAccessory = this.cachedHomebridgeAccessories[accessoryAddress];\r\n  if (!homebridgeAccessory) {\r\n    homebridgeAccessory = new Accessory(bluetoothAccessory.name,\r\n                                        UUIDGen.generate(bluetoothAccessory.name));\r\n    homebridgeAccessory.context['address'] = accessoryAddress;\r\n    this.homebridgeAPI.registerPlatformAccessories(\"homebridge-bluetooth\", \"Bluetooth\",\r\n                                                   [homebridgeAccessory]);\r\n  } else {\r\n    delete this.cachedHomebridgeAccessories[accessoryAddress];\r\n  }\r\n\r\n  bluetoothAccessory.connect(nobleAccessory, homebridgeAccessory);\r\n  nobleAccessory.once('disconnect', function (error) {\r\n    this.disconnect(nobleAccessory, homebridgeAccessory, error);\r\n  }.bind(this));\r\n\r\n  if (Object.keys(this.cachedHomebridgeAccessories).length > 0) {\r\n    Noble.startScanning([], false);\r\n  }\r\n};\r\n\r\n\r\nBluetoothPlatform.prototype.disconnect = function (nobleAccessory, homebridgeAccessory, error) {\r\n  var accessoryAddress = trimAddress(nobleAccessory.address);\r\n  this.cachedHomebridgeAccessories[accessoryAddress] = homebridgeAccessory;\r\n\r\n  Noble.startScanning([], false);\r\n};\r\n\r\n\r\nfunction trimAddress(address) {\r\n  return address.toLowerCase().replace(/:/g, \"\");\r\n}\r\n"
  },
  {
    "path": "source/service.js",
    "content": "var Service, BluetoothCharacteristic;\r\nvar Chalk = require('chalk');\r\n\r\nmodule.exports = function (service, bluetoothCharacteristic) {\r\n  Service = service;\r\n  BluetoothCharacteristic = bluetoothCharacteristic;\r\n\r\n  return BluetoothService;\r\n};\r\n\r\n\r\nfunction BluetoothService(log, config, prefix) {\r\n  this.log = log;\r\n\r\n  if (!config.name) {\r\n    throw new Error(\"Missing mandatory config 'name'\");\r\n  }\r\n  this.name = config.name;\r\n  this.prefix = prefix + \" \" + Chalk.magenta(\"[\" + this.name + \"]\");\r\n\r\n  if (!config.type) {\r\n    throw new Error(this.prefix + \" Missing mandatory config 'type'\");\r\n  }\r\n  this.type = config.type;\r\n  if (!Service[this.type]) {\r\n    throw new Error(this.prefix + \" Service type '\" + this.type + \"' is not defined. \" +\r\n                    \"See 'HAP-NodeJS/lib/gen/HomeKitType.js' for options.\")\r\n  }\r\n  this.class = Service[this.type]; // For example - Service.Lightbulb\r\n\r\n  if (!config.UUID) {\r\n    throw new Error(this.prefix + \" Missing mandatory config 'UUID'\");\r\n  }\r\n  this.UUID = config.UUID;\r\n\r\n  if (!config.characteristics || !(config.characteristics instanceof Array)) {\r\n    throw new Error(this.prefix + \" Missing mandatory config 'characteristics'\");\r\n  }\r\n\r\n  this.log.debug(this.prefix, \"Initialized | Service.\" + this.type + \" (\" + this.UUID + \")\");\r\n  this.bluetoothCharacteristics = {};\r\n  for (var characteristicConfig of config.characteristics) {\r\n    var characteristicUUID = trimUUID(characteristicConfig.UUID);\r\n    this.bluetoothCharacteristics[characteristicUUID] =\r\n        new BluetoothCharacteristic(this.log, characteristicConfig, this.prefix);\r\n  }\r\n\r\n  this.homebridgeService = null;\r\n  this.nobleService = null;\r\n}\r\n\r\n\r\nBluetoothService.prototype.connect = function (nobleService, homebridgeService) {\r\n  this.log.info(this.prefix, \"Connected\");\r\n  this.log.debug(this.prefix, \"Service.\" + this.type + \" (\" + this.UUID + \")\");\r\n  this.homebridgeService = homebridgeService;\r\n\r\n  this.nobleService = nobleService;\r\n  this.nobleService.discoverCharacteristics([], this.discoverCharacteristics.bind(this));\r\n};\r\n\r\n\r\nBluetoothService.prototype.discoverCharacteristics = function (error, nobleCharacteristics) {\r\n  if (error) {\r\n    this.log.error(this.prefix, \"Discover characteristics failed | \" + error);\r\n    return;\r\n  }\r\n  if (nobleCharacteristics.length == 0) {\r\n    this.log.warn(this.prefix, \"No characteristics discovered\");\r\n    return;\r\n  }\r\n\r\n  for (var nobleCharacteristic of nobleCharacteristics) {\r\n    var characteristicUUID = trimUUID(nobleCharacteristic.uuid);\r\n    var bluetoothCharacteristic = this.bluetoothCharacteristics[characteristicUUID];\r\n    if (!bluetoothCharacteristic) {\r\n      this.log.debug(this.prefix, \"Ignored | Characteristic (\" + nobleCharacteristic.uuid + \")\");\r\n      continue;\r\n    }\r\n\r\n    var homebridgeCharacteristic =\r\n        this.homebridgeService.getCharacteristic(bluetoothCharacteristic.class);\r\n    bluetoothCharacteristic.connect(nobleCharacteristic, homebridgeCharacteristic);\r\n  }\r\n};\r\n\r\n\r\nBluetoothService.prototype.disconnect = function () {\r\n  for (var characteristicUUID in this.bluetoothCharacteristics) {\r\n    this.bluetoothCharacteristics[characteristicUUID].disconnect();\r\n  }\r\n  if (this.nobleCharacteristic && this.homebridgeCharacteristic) {\r\n    this.homebridgeService = null;\r\n    this.nobleService = null;\r\n    this.log.info(this.prefix, \"Disconnected\");\r\n  }\r\n};\r\n\r\n\r\nfunction trimUUID(uuid) {\r\n  return uuid.toLowerCase().replace(/:/g, \"\").replace(/-/g, \"\");\r\n}\r\n"
  }
]