Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
joeinman authored Oct 8, 2024
1 parent 68301f4 commit ed529b7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ EmbedLog is a lightweight hardware agnostic logging library designed for embedde
#include <pico/stdlib.h>
#include <stdio.h>

using namespace EmbedLog;

int main()
{
EmbedLog::EmbedLog logge(
Expand All @@ -25,10 +27,11 @@ int main()
[](const std::string& message) { printf("%s", message.c_str()); },
[]() { return to_us_since_boot(get_absolute_time()); }
);
logger.open();

while (1)
{
logger.log(EmbedLog::LogLevel::INFO, "Hello, info world!\n");
logger.log(INFO, "Hello, info world!\n");
sleep_ms(1000);
}
}
Expand Down

0 comments on commit ed529b7

Please sign in to comment.