Skip to content
Snippets Groups Projects
Commit 41f3d497 authored by Alberto Nidasio's avatar Alberto Nidasio
Browse files

TEST

parent 80181401
No related branches found
No related tags found
No related merge requests found
Subproject commit 05fbcd61d1ddd0086cf218d5e7da583e315e5b5f
Subproject commit 854991ba6029959e8307c2a6df2f86e99cfd5bed
#include <diagnostic/PrintLogger.h>
#include <miosix.h>
#include <utils/Debug.h>
#include <diagnostic/PrintLogger.h>
#include <fstream>
#include <sstream>
using namespace miosix;
using namespace Boardcore;
int main()
{
PrintLogger logger = Logging::getLogger("main");
std::ofstream file("/sd/testfile.txt", std::ios::app);
if (file.is_open())
{
file << "Hi mom!" << std::endl;
file.close();
LOG_INFO(logger, "This is an info message");
LOG_ERR(logger, "This is an error message");
while (true)
{
ledOn();
Thread::sleep(500);
ledOff();
Thread::sleep(500);
}
}
else
{
while (true)
{
ledOn();
Thread::sleep(100);
ledOff();
Thread::sleep(100);
}
}
return 0;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment