| 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 | Serial.print("Configuring On/Off LED: Pin="); // initialization message |
| 18 | Serial.print(ledPin); |
| 19 | Serial.print("\n"); |
| 20 | |
| 21 | } // end constructor |
| 22 | |
| 23 | boolean update(){ // update() method |
| 24 |