Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: NeoPixelI2cSlave NeoPixelI2cSlave
periodic_effect.cpp
00001 #include "periodic_effect.h" 00002 00003 namespace Effects { 00004 00005 PeriodicEffect::PeriodicEffect(NeoPixelString * pixelstring, neopixel::Pixel color, int delay_ms) 00006 : Effect(pixelstring, color) { 00007 00008 this->delay_ms = delay_ms; 00009 } 00010 00011 void PeriodicEffect::start(void) { 00012 Effect::start(); 00013 ticker.attach(this, &PeriodicEffect::tick, delay_ms/1000.0); 00014 } 00015 00016 void PeriodicEffect::stop(void) { 00017 Effect::stop(); 00018 ticker.detach(); 00019 } 00020 00021 void PeriodicEffect::tick(void) { 00022 requestExecute(); 00023 } 00024 00025 };
Generated on Fri Jul 15 2022 00:27:27 by
1.7.2