This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import processing.serial.*; | |
Serial arduino; // Arduino と通信するための Serial オブジェクト | |
// データを格納するための配列を確保します。 | |
int size = 1200; | |
float[] d1 = new float[size]; | |
float[] d2 = new float[size]; | |
float[] d3 = new float[size]; | |
// グラフ描画用の設定値 | |
int top = 25; // グラフエリア上端の位置。 | |
int bottom = 675; // グラフエリア下端の位置。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <PID_v1.h> | |
#include <LiquidCrystal.h> | |
#define RelayPin 13 | |
LiquidCrystal lcd(12, 11, 10, 5, 4, 3, 2); | |
float a_in, b_in, temp1_c, temp2_c ; | |
float timePoints[6] = {2000,0,0,0,0,0};//Max num of timePoints is 6, milli sec | |
int tempTargets[6] = {74,0,0,0,0,0};//Degrees celcius | |
float startTime, now; | |
//Define Variables we'll be connecting to |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <PID_v1.h> //PID制御用のライブラリを読み込む | |
#include <LiquidCrystal.h> //LCD表示用のライブラリを読み込む | |
#define RelayPin 13 //SSRに接続するピンがpin13であると指定する | |
LiquidCrystal lcd(12, 11, 10, 5, 4, 3, 2); | |
float a_in, temp_c ; | |
double Setpoint = 70; //目標温度(摂氏) | |
double Input, Output; //PIDライブラリが利用する変数を宣言 | |
//PIDライブラリを使用する |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//SSRの制御 | |
digitalWrite(13, HIGH); | |
delay(3000); | |
digitalWrite(13, LOW); | |
delay(3000); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <LiquidCrystal.h>; | |
LiquidCrystal lcd(12, 11, 10, 5, 4, 3, 2); | |
float a_in, temp_c, t ; | |
void setup() | |
{ | |
Serial.begin(9600) ; // パソコン(ArduinoIDE)とシリアル通信の準備を行う | |
lcd.begin(16, 2); //16x2のキャラクタディスプレイであると宣言 | |
lcd.clear(); //LCDディスプレイに何か書かれていれば消去し、カーソル位置を左上にする |