2017-02-21 13:54:21 -08:00
|
|
|
/*
|
|
|
|
|
* The MIT License (MIT)
|
|
|
|
|
*
|
|
|
|
|
* Author: Your Full Name <your@email.address>
|
|
|
|
|
* Copyright (c) <year> <copyright holder>
|
|
|
|
|
*
|
2019-07-30 19:41:32 -07:00
|
|
|
* This program and the accompanying materials are made available under the
|
|
|
|
|
* terms of the The MIT License which is available at
|
|
|
|
|
* https://opensource.org/licenses/MIT.
|
2017-02-21 13:54:21 -08:00
|
|
|
*
|
2019-07-30 19:41:32 -07:00
|
|
|
* SPDX-License-Identifier: MIT
|
2017-02-21 13:54:21 -08:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include <iostream>
|
2017-08-30 15:00:29 -07:00
|
|
|
#include <string>
|
2017-02-21 13:54:21 -08:00
|
|
|
|
|
|
|
|
#include "sensortemplate.hpp"
|
2017-08-30 15:00:29 -07:00
|
|
|
#include "upm_utilities.h"
|
2017-02-21 13:54:21 -08:00
|
|
|
|
2017-08-30 15:00:29 -07:00
|
|
|
int
|
|
|
|
|
main()
|
2017-02-21 13:54:21 -08:00
|
|
|
{
|
|
|
|
|
//! [Interesting]
|
|
|
|
|
// Create an instance of SensorTemplate
|
|
|
|
|
upm::SensorTemplate sensor(0);
|
|
|
|
|
|
2017-08-30 15:00:29 -07:00
|
|
|
while (true) {
|
|
|
|
|
std::cout << "SensorTemplate says: " << sensor.helloWorld() << std::endl;
|
2017-02-21 13:54:21 -08:00
|
|
|
|
|
|
|
|
// Repeat every 2 seconds
|
2017-08-30 15:00:29 -07:00
|
|
|
upm_delay_us(2000000);
|
2017-02-21 13:54:21 -08:00
|
|
|
}
|
|
|
|
|
//! [Interesting]
|
|
|
|
|
return 0;
|
|
|
|
|
}
|