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

Method DEV_LED

examples/09-MessageLogging/DEV_LED.h:11–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9 SpanCharacteristic *power; // reference to the On Characteristic
10
11 DEV_LED(int ledPin) : Service::LightBulb(){ // constructor() method
12
13 power=new Characteristic::On();
14 this->ledPin=ledPin;
15 pinMode(ledPin,OUTPUT);
16
17 // Here we output log messages when the constructor is initially called.
18 // We use LOG0() to ensure the message is always output regardless of the
19 // LOG Level setting. Note this uses the single-argument form of LOG(), so
20 // multiple calls are needed to create a complete message
21
22 LOG0("Configuring On/Off LED: Pin="); // initialization message
23 LOG0(ledPin);
24 LOG0("\n");
25
26 } // end constructor
27
28 boolean update(){ // update() method
29

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected