Skip to content

Commit

Permalink
🎨 (spikes): Update lk_led_kit
Browse files Browse the repository at this point in the history
  • Loading branch information
HPezz committed Mar 1, 2022
1 parent d6102ec commit 9606338
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions spikes/lk_led_kit/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "HelloWorld.h"
#include "LedKit.h"
#include "LogKit.h"
#include "Waiting.h"

using namespace leka;
using namespace std::chrono;
Expand All @@ -26,6 +27,7 @@ auto animation_thread = rtos::Thread {};
auto animation_event_queue = events::EventQueue {};

auto ledkit = LedKit {animation_thread, animation_event_queue, ears, belt};
animation::Waiting animation_waiting(ears, belt);

auto colors_available = std::to_array({
RGB::pure_green,
Expand Down Expand Up @@ -61,7 +63,11 @@ auto main() -> int

while (true) {
auto t = rtos::Kernel::Clock::now() - start;
log_info("A message from your board %s --> \"%s\" at %i s\n", MBED_CONF_APP_TARGET_NAME, hello.world,
int(t.count() / 1000));

ledkit.start(animation_waiting);
rtos::ThisThread::sleep_for(40s);

ledkit.stop();
rtos::ThisThread::sleep_for(1s);
}
}

0 comments on commit 9606338

Please sign in to comment.