X10 Server - IOT device to leverage a collection of old X10 devices for home automation and lighting control.

Dependencies:   IniManager mbed HTTPClient SWUpdate mbed-rtos Watchdog X10 SW_HTTPServer SW_String EthernetInterface TimeInterface SSDP

X10 Server

See the X10 Server Nodebook page

SignOfLife.cpp

Committer:
WiredHome
Date:
2019-03-04
Revision:
11:f7a5b6c7305c
Parent:
10:ca0c1db6d933

File content as of revision 11:f7a5b6c7305c:


#include "SignOfLife.h"

PwmOut signOfLife(LED4);

/// ShowSignOfLife
///
/// Pulse an LED to indicate a sign of life of the program.
/// This also has some moderate entertainment value.
///
void ShowSignOfLife()
{
#define PI 3.14159265359
    static int degrees;
    float v;

    degrees += 1;
    v = sin(degrees * PI / 180)/2 + 0.5;
    signOfLife = v;     // a little dimmer
}