HomeSpan/examples/Tutorials/D-Expert/15-RealPushButtons/15-RealPushButtons.ino

41 lines
1.3 KiB
C++

////////////////////////////////////////////////////////////
// //
// HomeSpan: A HomeKit implementation for the ESP32 //
// ------------------------------------------------ //
// //
// Example 15: Real PushButtons //
// * manually controlling an LED //
// //
// //
////////////////////////////////////////////////////////////
#include "HomeSpan.h"
#include "DEV_LED.h"
#include "DEV_Identify.h"
void setup() {
Serial.begin(115200);
homeSpan.begin(Category::Bridges,"HomeSpan Bridge");
new SpanAccessory();
new DEV_Identify("Bridge #1","HomeSpan","123-ABC","HS Bridge","0.9",3);
new Service::HAPProtocolInformation();
new Characteristic::Version("1.1.0");
new SpanAccessory();
new DEV_Identify("Switched LED","HomeSpan","123-ABC","20mA LED","0.9",0);
new DEV_DimmableLED(0,17,19,5,18);
} // end of setup()
//////////////////////////////////////
void loop(){
homeSpan.poll();
} // end of loop()