Core Base Classes for the Light Endpoints
Dependents: mbed_mqtt_endpoint_ublox_ethernet mbed_mqtt_endpoint_ublox_cellular mbed_nsp_endpoint_ublox_cellular mbed_nsp_endpoint_ublox_ethernet ... more
Diff: MBEDLight.cpp
- Revision:
- 87:e9d77e9f9eae
- Parent:
- 84:4a993dd7c38b
- Child:
- 89:0af616fdea3b
--- a/MBEDLight.cpp Wed Mar 12 20:07:50 2014 +0000 +++ b/MBEDLight.cpp Wed Mar 12 23:47:30 2014 +0000 @@ -35,6 +35,15 @@ // turn OFF void MBEDLight::off() { this->logger()->led2Off(); this->logger()->led3Off(); Light::off(); this->logger()->dimRGB(1.0); } + // Blink + void MBEDLight::blink() { + for(int i=0;i<10;++i) { + this->on(); + wait_ms(500); + this->off(); + } +} + // dim void MBEDLight::dim(int value) { float dim_val = (float)(value/100.0);