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 モードになっています。

半田のジャンパを変えて、SPIの設定にしてください。

サーミスタについて
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
で呼ぶように変更しました。
Diff: edge_sensor/edge_accel.h
- Revision:
- 0:0b6732b53bf4
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/edge_sensor/edge_accel.h Tue Apr 24 08:58:33 2018 +0000
@@ -0,0 +1,78 @@
+#ifndef _EDGE_ACCEL_H_
+#define _EDGE_ACCEL_H_
+#include "mbed.h"
+#include "edge_sensor.h"
+#include "MMA8451Q.h"
+
+/**
+ * edge_accel edge_sensor which manage the accelerometer sensor (MMA8451Q)
+ * @note The behavior of this class is somewhat exceptional as an edge_sensor
+ * @note it samples and accumulates data which is the abs sum of current
+ * @note values and previous values every 0.1 sec
+ * @note and in each "interval" it delivers the averaged value
+ */
+
+class edge_accel : public edge_sensor {
+public:
+/**
+ * constructor
+ * @param the MMA8451Q object
+ */
+ edge_accel(MMA8451Q *accel) ;
+
+/**
+ * destructor
+ */
+ ~edge_accel(void) ;
+
+/**
+ * clear and reset interval values
+ */
+ virtual void reset(void) ;
+// virtual void prepare(void) ;
+
+/**
+ * sample calculate the average value
+ * from _accumulation and _sample_count
+ * the average value is assigned to _value
+ * and currnt _sample_count is stored in _num_sampled
+ * then both _accumuation and _sample_count will be cleared
+ * @returns 0: success non-0: failure
+ */
+ virtual int sample(void) ;
+
+/**
+ * deliver the value to the afero cloud
+ */
+ virtual int deliver(void) ;
+
+/**
+ * show the data in the display (TFT)
+ */
+ virtual void show(void) ;
+
+/**
+ * accum this is the real sampling
+ * and the differences of sampled values
+ * and previous values are calcurated and accumulated
+ * @returns 0: success non-0: failure
+ */
+ int accum(void) ;
+
+/**
+ * Clear internal values
+ */
+ void clear_value(void) ;
+
+private:
+ MMA8451Q *_accel ;
+ float _value ;
+ int32_t _num_sampled ;
+ int32_t _sample_count ;
+ int32_t _accumulation ;
+ int16_t _prev_x ;
+ int16_t _prev_y ;
+ int16_t _prev_z ;
+} ;
+
+#endif /* _EDGE_ACCEL_H_ */
\ No newline at end of file
La Suno