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: PhilipsLight.cpp
- Revision:
- 91:8732d54328ae
- Parent:
- 87:e9d77e9f9eae
- Child:
- 94:4939666f455d
--- a/PhilipsLight.cpp Thu Mar 13 00:07:59 2014 +0000 +++ b/PhilipsLight.cpp Thu Mar 13 17:25:18 2014 +0000 @@ -40,22 +40,10 @@ // turn the light off void PhilipsLight::off() { this->m_state = 0; this->update(); } - - // blink the light - void PhilipsLight::blink() { this->m_state = 2; this->doblink(); } - + // dim the light void PhilipsLight::dim(int dim) { this->m_dim = dim; this->update(); } - - // blinking loop - void PhilipsLight::doblink() { - for(int i=0;i<5;++i) { - this->on(); - wait_ms(1000); - this->off(); - } - } - + // set the light state void PhilipsLight::update() { // create the state string