コードを保存し、表示するための処理:アルドゥイーノ - データ私のArduinoのための
#include<EngduinoThermistor.h>
void setup()
{
Serial.begin(9600);
EngduinoThermistor.begin();
}void loop()
{
float temp;
temp = EngduinoThermistor.temperature();
Serial.println(temp);
delay(1000);
}
コード私の処理のために:私は処理を理解するために本当にハード試みたが、私はまだない
import processing.serial.*;
Serial port;
float x = 0;
void setup() {
size(500, 400);
println(Serial.list());
String portName = Serial.list()[0];
port = new Serial(this, "/dev/tty.usbmodem1411", 9600);
}
void draw() {
}
void serialEvent(Serial port) {
float inByte = port.read();
println(inByte);
stroke(90, 76, 99);
line(x, height, x, height - inByte);
if (x >=width) {
x=0;
background(200);
}
x++;
}
arduinoによって送信されたデータに基づいてグラフを描画する方法を理解する。私は主に問題がライン部分であると思います。私は前のポイントと新しいポイントを結ぶ線を描く方法を知らない。
しかし、全体的な問題でも動作しない問題がある場合は?:(
多分あなたは関数を呼び出す必要があります... –