MCPcopy Create free account
hub / github.com/HomeSpan/HomeSpan / DEV_LED

Method DEV_LED

examples/05-WorkingLED/DEV_LED.h:16–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14 // which specifies the pin to which the LED is attached.
15
16 DEV_LED(int ledPin) : Service::LightBulb(){
17
18 power=new Characteristic::On(); // this is where we create the On Characterstic we had previously defined in setup(). Save this in the pointer created above, for use below
19 this->ledPin=ledPin; // don't forget to store ledPin...
20 pinMode(ledPin,OUTPUT); // ...and set the mode for ledPin to be an OUTPUT (standard Arduino function)
21
22 } // end constructor
23
24 // Finally, we over-ride the default update() method with instructions that actually turn on/off the LED. Note update() returns type boolean
25

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected