项目作者: ItayRosen

项目描述 :
Plot real-time charts with data from serial port
高级语言: HTML
项目地址: git://github.com/ItayRosen/Serial-Plotter.git
创建时间: 2019-01-27T14:18:17Z
项目社区:https://github.com/ItayRosen/Serial-Plotter

开源协议:

下载


Serial-Plotter

Plot real-time charts with data from serial port

Preview

screenshot

Syntax

The syntax for input data from the serial port should be as follows: :datapoint1,datapoint2,timestamp;. Of course the number of datapoints is up to you and should be seperated by a comma. The beggining of the string should start with a colon (:) and should end with a semicolon (;).

How to use

  1. Start by opening the program (for a quick start using a windows machine, download the windows folder under dst and open Serial Plotter.exe).

  2. Next, add the datasets by clicking on the plus button next to Datasets.

  3. Now all is left is to connect to the serial port (by clicking on the green power button) and start receiving data.

  4. You can use the next three buttons to take a screenshot of the chart, pause the plotting and clear the chart of its data.

Arduino example

  1. #define sensor1 1
  2. #define sensor2 2
  3. void setup() {
  4. Serial.begin(9600);
  5. pinMode(1,INPUT);
  6. pinMode(2,INPUT);
  7. }
  8. void loop() {
  9. int sensor1_data = digitalRead(sensor1);
  10. int sensor2_data = digitalRead(sensor2);
  11. long timestamp = millis();
  12. String dataline = String(sensor1_data) + "," + String(sensor2_data) + "," + timestamp + ";";
  13. Serial.print(dataline);
  14. }