Temporary Connector Reversed Version

Dependencies:   UniGraphic mbed vt100

afero_poc15_180403R , J1 のピン配置を反転させたヴァージョンです。

Color2系を使用するためには以下のピンをジャンパで接続してください。
J1-D7 <-> J1-D0
J1-D6 <-> J1-D1

(調査中) また、こちらでテストした範囲では、
FRDM-KL25Z の V3.3 を、Modulo2 の VCC_3V3 ピンに接続してやる必要がありました。

尚、J1-D1, D0 を使用するために UART を無効にしているため
ログは表示されません。

TFTモジュールについて 
aitendoのTFTモジュールはデフォルトでは8bit bus モードになっています。
/media/uploads/Rhyme/img_2364.jpg

半田のジャンパを変えて、SPIの設定にしてください。
/media/uploads/Rhyme/img_2363.jpg

サーミスタについて
POC1.5 では サーミスタは 25℃の時に抵抗値が 50.0kΩになる502AT-11 が
4.95kΩのプルアップ(実際は10kΩx2の並列)で使用されていました。

今回の試作では抵抗値が 10.0kΩの 103AT-11 が
5.1kΩのプルアップで使用されていますので、係数を合わせるために
SMTC502AT-11 のコンストラクタを 
R0 = 10.0
R1 = 5.1
B = 3435
T0 = 298.15
で呼ぶように変更しました。

Committer:
Rhyme
Date:
Tue Apr 24 12:18:10 2018 +0000
Revision:
1:6c54dc8acf96
Parent:
0:0b6732b53bf4
to adjust with 103AT-11 with 5.1k pull-up, the constructor of 502AT-11 is called with R0=10.0, R1=5.1, B=3435, T0=298.15

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Rhyme 0:0b6732b53bf4 1 #ifndef _EDGE_TEMP_H_
Rhyme 0:0b6732b53bf4 2 #define _EDGE_TEMP_H_
Rhyme 0:0b6732b53bf4 3 #include "mbed.h"
Rhyme 0:0b6732b53bf4 4 #include "edge_sensor.h"
Rhyme 0:0b6732b53bf4 5 #include "LM75B.h"
Rhyme 0:0b6732b53bf4 6 #include "SMTC502AT.h"
Rhyme 0:0b6732b53bf4 7
Rhyme 0:0b6732b53bf4 8 /**
Rhyme 0:0b6732b53bf4 9 * edge_temp edge_sensor to measre temperature sensors
Rhyme 0:0b6732b53bf4 10 */
Rhyme 0:0b6732b53bf4 11
Rhyme 0:0b6732b53bf4 12 class edge_temp : public edge_sensor {
Rhyme 0:0b6732b53bf4 13 public:
Rhyme 0:0b6732b53bf4 14 /**
Rhyme 0:0b6732b53bf4 15 * constructor
Rhyme 0:0b6732b53bf4 16 * @param *temp1 LM75B temperature sensor object (with Color1)
Rhyme 0:0b6732b53bf4 17 * @param *temp2 SMTC502AT temperature sensor object (befor)
Rhyme 0:0b6732b53bf4 18 * @param *temp3 SMTC502AT temperature sensor object (after)
Rhyme 0:0b6732b53bf4 19 * @param *temp4 LM75B temperature sensor object (with Color2)
Rhyme 0:0b6732b53bf4 20 */
Rhyme 0:0b6732b53bf4 21 edge_temp(LM75B *temp1, SMTC502AT *temp2, SMTC502AT *temp3, LM75B *temp4) ;
Rhyme 0:0b6732b53bf4 22
Rhyme 0:0b6732b53bf4 23 /**
Rhyme 0:0b6732b53bf4 24 * destructor
Rhyme 0:0b6732b53bf4 25 */
Rhyme 0:0b6732b53bf4 26 ~edge_temp(void) ;
Rhyme 0:0b6732b53bf4 27
Rhyme 0:0b6732b53bf4 28 /**
Rhyme 0:0b6732b53bf4 29 * reset and clear the internal values
Rhyme 0:0b6732b53bf4 30 */
Rhyme 0:0b6732b53bf4 31 virtual void reset(void) ;
Rhyme 0:0b6732b53bf4 32
Rhyme 0:0b6732b53bf4 33 /**
Rhyme 0:0b6732b53bf4 34 * prepare for sampling
Rhyme 0:0b6732b53bf4 35 */
Rhyme 0:0b6732b53bf4 36 virtual void prepare(void) ;
Rhyme 0:0b6732b53bf4 37
Rhyme 0:0b6732b53bf4 38 /**
Rhyme 0:0b6732b53bf4 39 * sample measure and store sensor values
Rhyme 0:0b6732b53bf4 40 * @return 0: success non-0: failure
Rhyme 0:0b6732b53bf4 41 */
Rhyme 0:0b6732b53bf4 42 virtual int sample(void) ;
Rhyme 0:0b6732b53bf4 43
Rhyme 0:0b6732b53bf4 44 /**
Rhyme 0:0b6732b53bf4 45 * deliver the values to the afero cloud
Rhyme 0:0b6732b53bf4 46 */
Rhyme 0:0b6732b53bf4 47 virtual int deliver(void) ;
Rhyme 0:0b6732b53bf4 48
Rhyme 0:0b6732b53bf4 49 /**
Rhyme 0:0b6732b53bf4 50 * Show the value(s) in the display (TFT)
Rhyme 0:0b6732b53bf4 51 */
Rhyme 0:0b6732b53bf4 52 virtual void show(void) ;
Rhyme 0:0b6732b53bf4 53
Rhyme 0:0b6732b53bf4 54 private:
Rhyme 0:0b6732b53bf4 55 LM75B *_temp1 ;
Rhyme 0:0b6732b53bf4 56 SMTC502AT *_temp2 ;
Rhyme 0:0b6732b53bf4 57 SMTC502AT *_temp3 ;
Rhyme 0:0b6732b53bf4 58 LM75B *_temp4 ;
Rhyme 0:0b6732b53bf4 59 float _ftemp[4] ;
Rhyme 0:0b6732b53bf4 60 } ;
Rhyme 0:0b6732b53bf4 61
Rhyme 0:0b6732b53bf4 62 extern float *current_temp ;
Rhyme 0:0b6732b53bf4 63 #endif /* _EDGE_TEMP_H_ */