組み込みセンサの使い方
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
]
開始行:
[[山本]]
#contents
** 組み込みセンサで無線通信 [#df060026]
-必要な物~
ArduinoUNO3.0(以下Arduino)×1~
Arduino用USBケーブル×1~
e-HealthV2.0(以下e-health)~
各種用いるセンサ~
※今回はe-healthの脈波センサ,体温センサ~
Roving RN-XVee(以下wifiモジュール)~
PC(今回はwindows8.1を使用)~
~
+ハード構築~
・Arduinoとe-healthとwifiモジュールを接続する~
・Arduinoに脈波センサと体温センサを接続しPCと接続~
#ref(hard.jpeg,,50%)~
#ref(hard2.jpeg,,50%)~
接続方法が分からない場合は以下のURLを参照~
e-healthのチュートリアル~
https://www.cooking-hacks.com/documentation/tutorials/ehe...
wifiモジュールのチュートリアル~
https://www.cooking-hacks.com/blog/tutorial-wifi-module-f...
+PC内の環境構築~
・ArduinoIDEのインストール
以下のURLからArduinoIDEのver1.0.5をそれぞれのPCに合わせた...
※既に別verでのIDEをインストールしている場合は追加でインス...
https://www.arduino.cc/en/Main/OldSoftwareReleases#1.0.x~
・e-healthライブラリの導入
以下のURLのUsing the library with Arduinoの項のV2.4のライ...
https://www.cooking-hacks.com/documentation/tutorials/ehe...
その後解凍し,\Documents\Arduino\librariesに解凍したもの...
起動するとスケッチのユーザ提供にeHealthとPinChangeIntとい...
#ref(ide.png,,50%)
~
~
+xamppのインストール~
xamppとはApacheでサーバーを立てたりMySQLを使用できたりす...
https://www.apachefriends.org/jp/index.html~
上記のURLからそれぞれの環境に合わせてxamppをインストール~
インストールで不明な点があったら以下のURLを参考にしてくだ...
https://www.adminweb.jp/xampp/install/index1.html~
+xamppの設定変更~
C:\xamppの位置にxampp-control.exeというものがあるのでそち...
#ref(xammp.png,,50%)~
configからApache(http.conf)を選択すればApacheの設定ファ...
・ローカルIP設定~
Apacheの設定ファイルの58行目に~
Listen 80~
とあるので~
Listen 8080~
と書き換えておく~
Apacheの設定ファイルの221行目に~
ServerName localhost:80~
とあるので~
ServerName localhost:8080~
と書き換えておく~
・ディレクトリパス設定~
244・245行あたりの DocumentRoot と Directory のパスを下記...
DocumentRoot "C:/xampp/htdocs/changeroot"~
Directory "C:/xampp/htdocs/changeroot"~
その後にhtdocsの中にchangerootというフォルダを作っておく~
~
+wifiモジュールの設定と動作確認~
ArduinoIDEを用いてwifiモジュールを設定する~
まずは下記のコードを実行する~
void setup(){
}
void loop(){
}
マイコンボードに書き込む際にXbeeシールドのスイッチがUSB側...
書き込み後シリアルモニタを起動~
改行なし,9600に設定した後$$$と入力しENTER~
その結果CMDと返答があればコマンドモードに入る~
CMDと返答が来ない場合はUSBの接続,Xbeeシールドのスイッチ...
その後"改行なし"から"CFおよびLF"に変更し以下のコマンドを...
set wlan join 0
set wlan phrase basestation←使用するルータのパスワード
join AirMacTimeCapsule←使用するルータのIPアドレス
set dns address 192.168.0.1
set ip host 192.168.0.103←自分のPCのIPアドレスに変更
set ip gateway 192.168.0.1
set ip address 192.168.0.70
set ip remote 8080
set opt format 1
get ip
save
コマンド実行後以下の画像のように表示されていればok~
#ref(sirial1.jpg,,50%)~
#ref(sirial2.jpg,,50%)~
※注意する点~
set ip host ←PC側のIP~
set ip adress ←モジュール側~
IF=UPになっていることを確認する,IF=DOWNになっていると通...
** プログラムの実行 [#r9259838]
-概要
#ref(php.png,,50%)~
今回作成するプログラムは上記のようになる~
ArduinoからサーバにGETでデータを送信し、サーバ側ではPHPを...
+ArduinoIDEのコード(ファイル名はなんでもよい)
#include <PinChangeInt.h>
#include <eHealth.h>
//Enter here your data
const char wifi_ssid[] = "AirMacTimeCapsuleKO";←用いるル...
const char wifi_password[] = "basestation";←用いるルータ...
const char host[] = "192.168.0.103";←用いるPCのIP
const char gateway[] = "192.168.0.1";
const char server[] = "192.168.0.70";
const char host_port[] = "8080";
//const char GET[] = "test.php?Temperature=20&PRbpm=45";
const char GET[] = "test.php?Temperature=20&PRbpm=45";
int8_t answer;
char response[300];
char response2[100];
int cont;
char aux_str[100];
int s=1;
char value[50];
void setup()
{
//Write here you correct baud rate
Serial.begin(9600);
//Serial.begin(115200);
wificonfig();
eHealth.initPulsioximeter();
//Attach the inttruptions for using the pulsioximeter.
PCintPort::attachInterrupt(6, readPulsioximeter, RISIN...
}
void loop()
{
Serial.println(F("Sending HTTP GET"));
delay(5000);
while(s>0){
Serial.print("PRbpm : ");
Serial.print(eHealth.getBPM());
Serial.print(" %SPo2 : ");
Serial.print(eHealth.getOxygenSaturation());
Serial.print("\n");
Serial.println("=============================");
delay(500);
float temperature = eHealth.getTemperature();
Serial.print("Temperature (ºC): ");
Serial.print(temperature, 2);
Serial.println("");
sendGET(temperature,eHealth.getBPM());
delay(1000); // wait for a second
}
}
void wificonfig() {
Serial.println(F("Setting Wifi parameters"));
sendCommand("exit\r","EXIT",2000);
delay(2000);
enterConfig(2000);
sendCommand("leave\r","DeAuth",2000);
delay(1000);
// Sets DHCP and TCP protocol
sendCommand("set ip dhcp 1\r","AOK",2000);
delay(1000);
sendCommand("set ip protocol 18\r","AOK",2000);
delay(1000);
// Configures the way to join the network AP, sets the...
// network and joins it
sendCommand("set wlan join 0\r","AOK",2000); //The aut...
delay(1000);
snprintf(aux_str, sizeof(aux_str), "set wlan phrase %s...
sendCommand(aux_str,"AOK",2000);
delay(1000);
snprintf(aux_str, sizeof(aux_str), "join %s\r", wifi_s...
answer = sendCommand(aux_str,"Associated",10000);
if (answer == 1){
snprintf(aux_str, sizeof(aux_str), "Connected to \"%...
Serial.println(aux_str);
delay(5000);
}
else {
snprintf(aux_str, sizeof(aux_str), "Error connecting...
Serial.println(aux_str);
delay(1000);
}
Serial.println(F("Wifi succesfully configured"));
delay(1000);
}
void sendGET(float Temperature,int PRbpm) {
enterConfig(2000);
//sendCommand("set i h 0\r","AOK",2000);
delay(1000);
//snprintf(aux_str, sizeof(aux_str), "set d n %s\r", s...
//sendCommand(aux_str,"AOK",2000);
delay(1000);
snprintf(aux_str, sizeof(aux_str), "set dns address %s...
sendCommand(aux_str,"AOK",2000);
delay(1000);
snprintf(aux_str, sizeof(aux_str), "set ip host %s\r",...
sendCommand(aux_str,"AOK",2000);
delay(1000);
snprintf(aux_str, sizeof(aux_str), "set ip gateway %s\...
sendCommand(aux_str,"AOK",2000);
delay(1000);
snprintf(aux_str, sizeof(aux_str), "set ip address %s\...
sendCommand(aux_str,"AOK",2000);
delay(1000);
//Configures HTTP connection
snprintf(aux_str, sizeof(aux_str), "set ip remote %s\r...
sendCommand(aux_str,"AOK",2000);
delay(1000);
sendCommand("set opt format 1\r","AOK",2000);
delay(1000);
dtostrf(Temperature,5,2,value);
snprintf(aux_str, sizeof(aux_str), "set comm remote GE...
sendCommand(aux_str,"AOK",10000);
delay(1000);
// Calls open to launch the configured connection.
sendCommand("open\r","*CLOS*",10000);
delay(1000);
findResponse();
}
void findResponse(){
Serial.println(response);
boolean go_On = true;
uint16_t counter = 0;
while (go_On){
if (response[counter] == '\r'){
if (response[counter+1] == '\n'){
if (response[counter+2] == '\r'){
if (response[counter+3] == '\n'){
go_On = false;
}
}
}
}
counter++;
}
counter = counter + 3;
for (int i=0;response[i+counter]!='*'; i++){
response2[i] = response[i+counter];
delay(100);
}
snprintf(aux_str, sizeof(aux_str), "GET response:\"%s\...
Serial.println(aux_str);
}
int8_t sendCommand(const char* Command, const char* expe...
uint8_t x=0, answer=0;
unsigned long previous;
memset(response, 0,300); // Initialize the string
delay(100);
while( Serial.available() > 0) Serial.read(); // Cl...
Serial.println(Command); // Send Command
x = 0;
previous = millis();
// this loop waits for the answer
do{
if(Serial.available() != 0){
// if there are data in the UART input buffer, rea...
response[x] = Serial.read();
x++;
// check if the desired answer is in the response...
if (strstr(response, expected_answer) != NULL)
{
answer = 1;
}
}
}
// Waits for the asnwer with time out
while((answer == 0) && ((millis() - previous) < timeou...
return answer;
}
int8_t enterConfig(unsigned int timeout){
uint8_t x=0, answer=0;
unsigned long previous;
memset(response, 0,300); // Initialize the string
delay(100);
while( Serial.available() > 0) Serial.read(); // Cl...
Serial.print("$$$"); // Send Command
x = 0;
previous = millis();
// this loop waits for the answer
do{
if(Serial.available() != 0){
// if there are data in the UART input buffer, rea...
response[x] = Serial.read();
x++;
// check if the desired answer is in the response...
if (strstr(response, "CMD") != NULL)
{
answer = 1;
}
}
}
// Waits for the asnwer with time out
while((answer == 0) && ((millis() - previous) < timeou...
return answer;
}
void readPulsioximeter(){
cont ++;
if (cont == 50) { //Get only of one 50 measures to red...
eHealth.readPulsioximeter();
cont = 0;
}
}
+php側の記述(ファイル名test.php)~
ファイルの保存場所 C:\xampp\htdocs\changeroot~
<?php
$filename = "data.txt";
$data1 = $_GET['Temperature'];
$data2 = $_GET['PRbpm'];
if($data1=='a'){
$fp = fopen($filename, "r");
$contents = fread($fp, filesize($filename));
print($contents);
fclose($fp);
}
else{
$fp = fopen($filename, 'a');
date_default_timezone_set('Asia/Tokyo');
fwrite($fp, date("Y-m-d H:i:s")."\t".$data1."\t".$da...
fclose($fp);
}
?>
+実行~
①xamppでapacheをstartで起動~
②次にArduinoIDEで書き込みを行う,書き込みを行う際はXveeの...
③シリアルモニタを起動,念のためにRESETボタンを一度押す,以...
#ref(sirial3.jpg,,50%)~
④C:\xampp\htdocs\changerootファルダを確認しdata.txtファイ...
その中身が以下の画像のように時刻,センサ1の値,センサ2...
#ref(data.png,,50%)~
⑤ブラウザ側での結果確認~
ブラウザのURLに~
localhost:8080/test.php?Temperature=a&PRbpm=a~
と入力するとブラウザにdata.txtの結果が表示される~
** gnuplot [#e17b04ad]
以下のURLよりgnuplotをインストールする~
https://sourceforge.net/projects/gnuplot/files/gnuplot/~
C:\Program Files\gnuplot\binよりwgnuplot.exeを起動,以下の...
set xdata time
set timefmt "%H:%M:%S"
set xrange ["16:30:00":"17:00:00"]
set grid
set xlabel 'Time'
set ylabel 'Temperature [deg C]'
set title 'Yamamoto'
p "data.txt" u 2:3 w l lc rgb "#FF0000" notitle,"data.tx...
2:3の2は時刻,3は体温を指定しているので3を4に変更すると脈...
以下実行結果画像~
#ref(temp.png,,50%)~
** 参考URL [#ea930711]
e-Health Sensor Platform V2.0 for Arduino and Raspberry Pi~
https://www.cooking-hacks.com/documentation/tutorials/ehe...
Tutorial: Wifi Module for Arduino "Roving RN-XVee"~
https://www.cooking-hacks.com/blog/tutorial-wifi-module-f...
wifiモジュールのコマンド集~
http://www.cooking-hacks.com/skin/frontend/default/cookin...
e-healthに関する質問はこちらのプラットホームで~
https://www.cooking-hacks.com/forum/index.php?sid=5acefe8...
ArduinoIDEの参考にしたコード~
https://www.cooking-hacks.com/forum/viewtopic.php?f=20&t=...
xamppの使い方~
https://www.adminweb.jp/xampp/~
phpの参考サイト~
http://nn-hokuson.hatenablog.com/entry/2017/04/09/091148~
終了行:
[[山本]]
#contents
** 組み込みセンサで無線通信 [#df060026]
-必要な物~
ArduinoUNO3.0(以下Arduino)×1~
Arduino用USBケーブル×1~
e-HealthV2.0(以下e-health)~
各種用いるセンサ~
※今回はe-healthの脈波センサ,体温センサ~
Roving RN-XVee(以下wifiモジュール)~
PC(今回はwindows8.1を使用)~
~
+ハード構築~
・Arduinoとe-healthとwifiモジュールを接続する~
・Arduinoに脈波センサと体温センサを接続しPCと接続~
#ref(hard.jpeg,,50%)~
#ref(hard2.jpeg,,50%)~
接続方法が分からない場合は以下のURLを参照~
e-healthのチュートリアル~
https://www.cooking-hacks.com/documentation/tutorials/ehe...
wifiモジュールのチュートリアル~
https://www.cooking-hacks.com/blog/tutorial-wifi-module-f...
+PC内の環境構築~
・ArduinoIDEのインストール
以下のURLからArduinoIDEのver1.0.5をそれぞれのPCに合わせた...
※既に別verでのIDEをインストールしている場合は追加でインス...
https://www.arduino.cc/en/Main/OldSoftwareReleases#1.0.x~
・e-healthライブラリの導入
以下のURLのUsing the library with Arduinoの項のV2.4のライ...
https://www.cooking-hacks.com/documentation/tutorials/ehe...
その後解凍し,\Documents\Arduino\librariesに解凍したもの...
起動するとスケッチのユーザ提供にeHealthとPinChangeIntとい...
#ref(ide.png,,50%)
~
~
+xamppのインストール~
xamppとはApacheでサーバーを立てたりMySQLを使用できたりす...
https://www.apachefriends.org/jp/index.html~
上記のURLからそれぞれの環境に合わせてxamppをインストール~
インストールで不明な点があったら以下のURLを参考にしてくだ...
https://www.adminweb.jp/xampp/install/index1.html~
+xamppの設定変更~
C:\xamppの位置にxampp-control.exeというものがあるのでそち...
#ref(xammp.png,,50%)~
configからApache(http.conf)を選択すればApacheの設定ファ...
・ローカルIP設定~
Apacheの設定ファイルの58行目に~
Listen 80~
とあるので~
Listen 8080~
と書き換えておく~
Apacheの設定ファイルの221行目に~
ServerName localhost:80~
とあるので~
ServerName localhost:8080~
と書き換えておく~
・ディレクトリパス設定~
244・245行あたりの DocumentRoot と Directory のパスを下記...
DocumentRoot "C:/xampp/htdocs/changeroot"~
Directory "C:/xampp/htdocs/changeroot"~
その後にhtdocsの中にchangerootというフォルダを作っておく~
~
+wifiモジュールの設定と動作確認~
ArduinoIDEを用いてwifiモジュールを設定する~
まずは下記のコードを実行する~
void setup(){
}
void loop(){
}
マイコンボードに書き込む際にXbeeシールドのスイッチがUSB側...
書き込み後シリアルモニタを起動~
改行なし,9600に設定した後$$$と入力しENTER~
その結果CMDと返答があればコマンドモードに入る~
CMDと返答が来ない場合はUSBの接続,Xbeeシールドのスイッチ...
その後"改行なし"から"CFおよびLF"に変更し以下のコマンドを...
set wlan join 0
set wlan phrase basestation←使用するルータのパスワード
join AirMacTimeCapsule←使用するルータのIPアドレス
set dns address 192.168.0.1
set ip host 192.168.0.103←自分のPCのIPアドレスに変更
set ip gateway 192.168.0.1
set ip address 192.168.0.70
set ip remote 8080
set opt format 1
get ip
save
コマンド実行後以下の画像のように表示されていればok~
#ref(sirial1.jpg,,50%)~
#ref(sirial2.jpg,,50%)~
※注意する点~
set ip host ←PC側のIP~
set ip adress ←モジュール側~
IF=UPになっていることを確認する,IF=DOWNになっていると通...
** プログラムの実行 [#r9259838]
-概要
#ref(php.png,,50%)~
今回作成するプログラムは上記のようになる~
ArduinoからサーバにGETでデータを送信し、サーバ側ではPHPを...
+ArduinoIDEのコード(ファイル名はなんでもよい)
#include <PinChangeInt.h>
#include <eHealth.h>
//Enter here your data
const char wifi_ssid[] = "AirMacTimeCapsuleKO";←用いるル...
const char wifi_password[] = "basestation";←用いるルータ...
const char host[] = "192.168.0.103";←用いるPCのIP
const char gateway[] = "192.168.0.1";
const char server[] = "192.168.0.70";
const char host_port[] = "8080";
//const char GET[] = "test.php?Temperature=20&PRbpm=45";
const char GET[] = "test.php?Temperature=20&PRbpm=45";
int8_t answer;
char response[300];
char response2[100];
int cont;
char aux_str[100];
int s=1;
char value[50];
void setup()
{
//Write here you correct baud rate
Serial.begin(9600);
//Serial.begin(115200);
wificonfig();
eHealth.initPulsioximeter();
//Attach the inttruptions for using the pulsioximeter.
PCintPort::attachInterrupt(6, readPulsioximeter, RISIN...
}
void loop()
{
Serial.println(F("Sending HTTP GET"));
delay(5000);
while(s>0){
Serial.print("PRbpm : ");
Serial.print(eHealth.getBPM());
Serial.print(" %SPo2 : ");
Serial.print(eHealth.getOxygenSaturation());
Serial.print("\n");
Serial.println("=============================");
delay(500);
float temperature = eHealth.getTemperature();
Serial.print("Temperature (ºC): ");
Serial.print(temperature, 2);
Serial.println("");
sendGET(temperature,eHealth.getBPM());
delay(1000); // wait for a second
}
}
void wificonfig() {
Serial.println(F("Setting Wifi parameters"));
sendCommand("exit\r","EXIT",2000);
delay(2000);
enterConfig(2000);
sendCommand("leave\r","DeAuth",2000);
delay(1000);
// Sets DHCP and TCP protocol
sendCommand("set ip dhcp 1\r","AOK",2000);
delay(1000);
sendCommand("set ip protocol 18\r","AOK",2000);
delay(1000);
// Configures the way to join the network AP, sets the...
// network and joins it
sendCommand("set wlan join 0\r","AOK",2000); //The aut...
delay(1000);
snprintf(aux_str, sizeof(aux_str), "set wlan phrase %s...
sendCommand(aux_str,"AOK",2000);
delay(1000);
snprintf(aux_str, sizeof(aux_str), "join %s\r", wifi_s...
answer = sendCommand(aux_str,"Associated",10000);
if (answer == 1){
snprintf(aux_str, sizeof(aux_str), "Connected to \"%...
Serial.println(aux_str);
delay(5000);
}
else {
snprintf(aux_str, sizeof(aux_str), "Error connecting...
Serial.println(aux_str);
delay(1000);
}
Serial.println(F("Wifi succesfully configured"));
delay(1000);
}
void sendGET(float Temperature,int PRbpm) {
enterConfig(2000);
//sendCommand("set i h 0\r","AOK",2000);
delay(1000);
//snprintf(aux_str, sizeof(aux_str), "set d n %s\r", s...
//sendCommand(aux_str,"AOK",2000);
delay(1000);
snprintf(aux_str, sizeof(aux_str), "set dns address %s...
sendCommand(aux_str,"AOK",2000);
delay(1000);
snprintf(aux_str, sizeof(aux_str), "set ip host %s\r",...
sendCommand(aux_str,"AOK",2000);
delay(1000);
snprintf(aux_str, sizeof(aux_str), "set ip gateway %s\...
sendCommand(aux_str,"AOK",2000);
delay(1000);
snprintf(aux_str, sizeof(aux_str), "set ip address %s\...
sendCommand(aux_str,"AOK",2000);
delay(1000);
//Configures HTTP connection
snprintf(aux_str, sizeof(aux_str), "set ip remote %s\r...
sendCommand(aux_str,"AOK",2000);
delay(1000);
sendCommand("set opt format 1\r","AOK",2000);
delay(1000);
dtostrf(Temperature,5,2,value);
snprintf(aux_str, sizeof(aux_str), "set comm remote GE...
sendCommand(aux_str,"AOK",10000);
delay(1000);
// Calls open to launch the configured connection.
sendCommand("open\r","*CLOS*",10000);
delay(1000);
findResponse();
}
void findResponse(){
Serial.println(response);
boolean go_On = true;
uint16_t counter = 0;
while (go_On){
if (response[counter] == '\r'){
if (response[counter+1] == '\n'){
if (response[counter+2] == '\r'){
if (response[counter+3] == '\n'){
go_On = false;
}
}
}
}
counter++;
}
counter = counter + 3;
for (int i=0;response[i+counter]!='*'; i++){
response2[i] = response[i+counter];
delay(100);
}
snprintf(aux_str, sizeof(aux_str), "GET response:\"%s\...
Serial.println(aux_str);
}
int8_t sendCommand(const char* Command, const char* expe...
uint8_t x=0, answer=0;
unsigned long previous;
memset(response, 0,300); // Initialize the string
delay(100);
while( Serial.available() > 0) Serial.read(); // Cl...
Serial.println(Command); // Send Command
x = 0;
previous = millis();
// this loop waits for the answer
do{
if(Serial.available() != 0){
// if there are data in the UART input buffer, rea...
response[x] = Serial.read();
x++;
// check if the desired answer is in the response...
if (strstr(response, expected_answer) != NULL)
{
answer = 1;
}
}
}
// Waits for the asnwer with time out
while((answer == 0) && ((millis() - previous) < timeou...
return answer;
}
int8_t enterConfig(unsigned int timeout){
uint8_t x=0, answer=0;
unsigned long previous;
memset(response, 0,300); // Initialize the string
delay(100);
while( Serial.available() > 0) Serial.read(); // Cl...
Serial.print("$$$"); // Send Command
x = 0;
previous = millis();
// this loop waits for the answer
do{
if(Serial.available() != 0){
// if there are data in the UART input buffer, rea...
response[x] = Serial.read();
x++;
// check if the desired answer is in the response...
if (strstr(response, "CMD") != NULL)
{
answer = 1;
}
}
}
// Waits for the asnwer with time out
while((answer == 0) && ((millis() - previous) < timeou...
return answer;
}
void readPulsioximeter(){
cont ++;
if (cont == 50) { //Get only of one 50 measures to red...
eHealth.readPulsioximeter();
cont = 0;
}
}
+php側の記述(ファイル名test.php)~
ファイルの保存場所 C:\xampp\htdocs\changeroot~
<?php
$filename = "data.txt";
$data1 = $_GET['Temperature'];
$data2 = $_GET['PRbpm'];
if($data1=='a'){
$fp = fopen($filename, "r");
$contents = fread($fp, filesize($filename));
print($contents);
fclose($fp);
}
else{
$fp = fopen($filename, 'a');
date_default_timezone_set('Asia/Tokyo');
fwrite($fp, date("Y-m-d H:i:s")."\t".$data1."\t".$da...
fclose($fp);
}
?>
+実行~
①xamppでapacheをstartで起動~
②次にArduinoIDEで書き込みを行う,書き込みを行う際はXveeの...
③シリアルモニタを起動,念のためにRESETボタンを一度押す,以...
#ref(sirial3.jpg,,50%)~
④C:\xampp\htdocs\changerootファルダを確認しdata.txtファイ...
その中身が以下の画像のように時刻,センサ1の値,センサ2...
#ref(data.png,,50%)~
⑤ブラウザ側での結果確認~
ブラウザのURLに~
localhost:8080/test.php?Temperature=a&PRbpm=a~
と入力するとブラウザにdata.txtの結果が表示される~
** gnuplot [#e17b04ad]
以下のURLよりgnuplotをインストールする~
https://sourceforge.net/projects/gnuplot/files/gnuplot/~
C:\Program Files\gnuplot\binよりwgnuplot.exeを起動,以下の...
set xdata time
set timefmt "%H:%M:%S"
set xrange ["16:30:00":"17:00:00"]
set grid
set xlabel 'Time'
set ylabel 'Temperature [deg C]'
set title 'Yamamoto'
p "data.txt" u 2:3 w l lc rgb "#FF0000" notitle,"data.tx...
2:3の2は時刻,3は体温を指定しているので3を4に変更すると脈...
以下実行結果画像~
#ref(temp.png,,50%)~
** 参考URL [#ea930711]
e-Health Sensor Platform V2.0 for Arduino and Raspberry Pi~
https://www.cooking-hacks.com/documentation/tutorials/ehe...
Tutorial: Wifi Module for Arduino "Roving RN-XVee"~
https://www.cooking-hacks.com/blog/tutorial-wifi-module-f...
wifiモジュールのコマンド集~
http://www.cooking-hacks.com/skin/frontend/default/cookin...
e-healthに関する質問はこちらのプラットホームで~
https://www.cooking-hacks.com/forum/index.php?sid=5acefe8...
ArduinoIDEの参考にしたコード~
https://www.cooking-hacks.com/forum/viewtopic.php?f=20&t=...
xamppの使い方~
https://www.adminweb.jp/xampp/~
phpの参考サイト~
http://nn-hokuson.hatenablog.com/entry/2017/04/09/091148~
ページ名: