lib para o framework sgam
Dependencies: MPU6050 Grove_temperature
Dependents: example_smart-grid
peripheral/impl/Temperature.cpp@3:f998244e9f80, 2019-06-02 (annotated)
- Committer:
- AndersonIctus
- Date:
- Sun Jun 02 16:51:13 2019 -0300
- Revision:
- 3:f998244e9f80
- Parent:
- 1:53edfdd6ac03
- Child:
- 4:f21aab30658a
- Inclusao dos Arquivos para o GIROSCOPIO !!
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
AndersonIctus | 3:f998244e9f80 | 1 | #include "mbed.h" |
AndersonIctus | 1:53edfdd6ac03 | 2 | #include "Temperature.h" |
AndersonIctus | 1:53edfdd6ac03 | 3 | |
AndersonIctus | 1:53edfdd6ac03 | 4 | Temperature::Temperature(PinName pin): temperature(pin) { } |
AndersonIctus | 1:53edfdd6ac03 | 5 | |
AndersonIctus | 3:f998244e9f80 | 6 | Temperature::~Temperature() { |
AndersonIctus | 3:f998244e9f80 | 7 | // ~Sensor(); |
AndersonIctus | 1:53edfdd6ac03 | 8 | |
AndersonIctus | 3:f998244e9f80 | 9 | temperature.~Grove_temperature(); |
AndersonIctus | 1:53edfdd6ac03 | 10 | } |
AndersonIctus | 1:53edfdd6ac03 | 11 | |
AndersonIctus | 3:f998244e9f80 | 12 | float* Temperature::getValue() { |
AndersonIctus | 3:f998244e9f80 | 13 | Temperature::value = temperature.getTemperature(); |
AndersonIctus | 3:f998244e9f80 | 14 | return &value; |
AndersonIctus | 3:f998244e9f80 | 15 | } |
AndersonIctus | 3:f998244e9f80 | 16 | |
AndersonIctus | 3:f998244e9f80 | 17 | void Temperature::readOcurred(void* (*callBack)(float* value), float timeout) { |
AndersonIctus | 3:f998244e9f80 | 18 | // float value = temperature.getTemperature(); |
AndersonIctus | 1:53edfdd6ac03 | 19 | |
AndersonIctus | 1:53edfdd6ac03 | 20 | if(callBack != NULL) |
AndersonIctus | 3:f998244e9f80 | 21 | callBack(&value); |
AndersonIctus | 1:53edfdd6ac03 | 22 | } |