Added a GPIO to power on/off for external I2C sensor(s) (with LEDs)

Dependencies:   UniGraphic mbed vt100

18-Jun-2018 外部センサの電源オン・オフ機能は下位互換の為に無効になっていました。 この版で再度有効にしました。

Committer:
Rhyme
Date:
Fri Apr 13 04:19:23 2018 +0000
Revision:
0:846e2321c637
power to color sensor on/off test OK. Currently the function is disabled.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Rhyme 0:846e2321c637 1 #ifndef _SMTC502AT_H_
Rhyme 0:846e2321c637 2 #define _SMTC502AT_H_
Rhyme 0:846e2321c637 3
Rhyme 0:846e2321c637 4 #include "mbed.h"
Rhyme 0:846e2321c637 5
Rhyme 0:846e2321c637 6 /**
Rhyme 0:846e2321c637 7 * Semitec 502AT-11 temperature sensor
Rhyme 0:846e2321c637 8 */
Rhyme 0:846e2321c637 9
Rhyme 0:846e2321c637 10 class SMTC502AT {
Rhyme 0:846e2321c637 11 public:
Rhyme 0:846e2321c637 12 /**
Rhyme 0:846e2321c637 13 * constructor
Rhyme 0:846e2321c637 14 * @param *ain AnalogIn object
Rhyme 0:846e2321c637 15 * @param R0 5.0 ohm (default)
Rhyme 0:846e2321c637 16 * @param R1 4.95 ohm (default)
Rhyme 0:846e2321c637 17 * @param B 3324 (default)
Rhyme 0:846e2321c637 18 * @param T0 298.15 (default)
Rhyme 0:846e2321c637 19 */
Rhyme 0:846e2321c637 20 SMTC502AT(AnalogIn *ain, float R0=5.0, float R1=4.95, float B=3324, float T0=298.15) ;
Rhyme 0:846e2321c637 21
Rhyme 0:846e2321c637 22 /**
Rhyme 0:846e2321c637 23 * destructor
Rhyme 0:846e2321c637 24 */
Rhyme 0:846e2321c637 25 ~SMTC502AT(void) ;
Rhyme 0:846e2321c637 26
Rhyme 0:846e2321c637 27 /**
Rhyme 0:846e2321c637 28 * getTemp get temperature
Rhyme 0:846e2321c637 29 * @returns temperature in float format
Rhyme 0:846e2321c637 30 */
Rhyme 0:846e2321c637 31 float getTemp(void) ;
Rhyme 0:846e2321c637 32 private:
Rhyme 0:846e2321c637 33 AnalogIn *_ain ;
Rhyme 0:846e2321c637 34 float _r0 ;
Rhyme 0:846e2321c637 35 float _r1 ;
Rhyme 0:846e2321c637 36 float _b ;
Rhyme 0:846e2321c637 37 float _t0 ;
Rhyme 0:846e2321c637 38 } ;
Rhyme 0:846e2321c637 39
Rhyme 0:846e2321c637 40 #endif /* _SMTC502AT_H_ */