mirror of
https://github.com/eclipse/upm.git
synced 2025-03-25 09:49:59 +03:00
27 lines
414 B
C++
27 lines
414 B
C++
#include <iostream>
|
|
#include <vector>
|
|
|
|
#include "lm35.hpp"
|
|
#include "abp.hpp"
|
|
|
|
using namespace std;
|
|
using namespace upm;
|
|
|
|
int
|
|
main()
|
|
{
|
|
vector<iTemperature*> tempSensors {new LM35(0), new ABP(0, ABP_DEFAULT_ADDRESS)};
|
|
|
|
for (auto sensor : tempSensors) {
|
|
cout << sensor->getTemperature() << endl;
|
|
}
|
|
|
|
for (iTemperature* sensor : tempSensors) {
|
|
delete sensor;
|
|
}
|
|
|
|
tempSensors.clear();
|
|
|
|
return 0;
|
|
}
|