IEEE1888 GateWay sample that handles multiple sensors.

Dependencies:   EthernetInterface Fiap HTTPClientForFIAP NTPClient mbed-rtos mbed spxml

Fork of IEEE1888_TEMP_NODE by Satoru Yoshida

You are viewing an older revision! See the latest version

Homepage

This program sends data to FIAP storage with IEEE1888 format.

Note: You should define FIAP_STORAGE constants at least before using this program. FIAP_STORAGE and other constants are contained in main.h file.

You can launch an AMI ( Amazon Machine Image ) on Amazon Web Service ( http://aws.amazon.com/ ) as the FIAP storage. The AMI is named as "IEEE1888 FIAP Storage", registered at Tokyo region. The AMI number is "ami-932ca892" .

If You need more information about the AMI, http://see d.hatena.ne.jp/satoruyoshida/20130210/1360508112

/media/uploads/strysd/fiap_ami.jpg

This image shows sample data of IEEE1888 format.

Note: this image is shown if FIAP_DEBUG_MODE is set to true.

/media/uploads/strysd/fiap_protocol.jpg

You can define COUNT_OF_POINTS constant as number of sensors and/or degital inputs. In this program, I use P19 and P20 for analog inputs from 2 sensors, and no use degital inputs. So I define the COUNT_OF_POINTS as 2. P19 is connected to illuminance sensor, S9648 (HAMAMATSU PHOTONICS K.K.). And P20 is connected to temperature sensor, LM35 (National Semiconductor Corporation) . You can also use LM61BIZ instead if you like. /media/uploads/strysd/fiap_2_sensors.jpg

from here, in Japanese. このプログラムは IEEE1888 形式で FIAP Storage にデータ送信する例です。 このプログラムを使用する前に、少なくとも main.h ファイルの FIAP_STORAGE 定数を定義する必要があります。

Amazon Web Service に用意した AMI を利用して FIAP Storage を起動することができます。IEEE1888 FIAP Storage という名前の公開 AMI です。(番号は ami-932ca892 )

この AMI について詳しくは、http://d.hatena.ne.jp/satoruyoshida/20130210/1360508112 をご覧ください。

なお、main.h にはほかにも定数があります。例えば、IEEE1888 (FIAP) の通信内容をコンソールで確認したい場合は、FIAP_DEBUG_MODE を true にします。 また、センサーやデジタル入力の個数に沿って、COUNT_OF_POINTS を定義します。

このプログラム例では、P19 および P20 をセンサーからのアナログ入力として使用しています。デジタル入力はありません。そのため、COUNT_OF_POINTS を 2 と定義しています。 P19 には浜松ホトニクス社製の照度センサー S9648、P20 にはナショナル・セミコンダクターの温度センサー LM35 を接続しています。 参考までに LM35 を LM61BIZ に置き換えた場合の設定値もコメントアウト状態で入れてあります

(ここから日本語文のみの内容) トランジスタ技術 2012年 2月号 の P189 - P195 に、Arduino、Ethernet シールド、温度センサー(LM35)、照度センサー(S9648-100)、DIP スイッチおよびトグルスイッチを用いたネットワーク温度&照度計の記事が掲載されています(落合 秀也 様/井上 博之 様)。 このプログラムでは、照度センサーは S9648-100 ではなく、より安価な S9648 で代用し、スイッチ 2 種類は省略していますのでご注意ください。 S9648 の負荷抵抗に並列に入れたコンデンサーは、手元に余っていた 15pF です。この容量が妥当かどうかは不明です。


All wikipages