6.4.2 Copy IRP_program.cpp into user_code.cpp file
The result should look like below:
//
// This file was automatically generated from Marvin iRP.
// You can use this file as starting point for your own Marvin C++ program.
//
#include "user_code.h"
void
user_code::Task(
void
* pContext __attribute__((unused)))
{
// Creats a second clock in the user
// display and beeps every ten seconds.
for
(;;)
{
virtualDisplay::Lock();
virtualDisplay::ClearLine(0);
virtualDisplay::WriteString(0,
"My
␣
Clock:
␣
"
);
virtualDisplay::WriteInt(0, driver::rtc::GetHours());
virtualDisplay::WriteString(0,
":"
);
virtualDisplay::WriteInt(0, driver::rtc::GetMinutes());
virtualDisplay::WriteString(0,
":"
);
virtualDisplay::WriteInt(0, driver::rtc::GetSeconds());
virtualDisplay::Unlock();
// Beep every 10 seconds
if
(driver::rtc::GetSeconds() % 10 == 0)
{
userInterface::webAudio.amp = 0.5;
userInterface::webAudio.time_ms = 100;
userInterface::webAudio.freq = 880;
}
}
}
AREXX Engineering & JM³ Engineering
Version: 1.3.1
October 27, 2017
Page: 52