PLX-DAQ 이용한 아두이노와 엑셀연동

https://www.parallax.com/downloads/plx-daq 


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
int sensorA = A0;    
int sensorA_value = 0;
 
int sensorB = A1;    
int sensorB_value = 0;  
 
int sensorC = A2;    
int sensorC_value = 0;    
 
void setup() { 
  Serial.begin(9600);
  Serial.println("CLEARDATA"); //시작시 데이터 클리어
  Serial.println("LABEL,Time,SenserA,SenserB,SenserC"); // 테이블명  
}
 
void loop() {
  sensorA_value = analogRead(sensorA);
  sensorB_value = analogRead(sensorB);
  sensorC_value = analogRead(sensorC);    
 
 
  Serial.print("DATA,TIME,");                          
  Serial.print(sensorA_value); 
  Serial.print(",");              
  Serial.print(sensorB_value); 
  Serial.print(",");
  Serial.println(sensorC_value);
  
  delay(300000);
cs


+ Recent posts