| 
 | 
 
各位前輩,我第一次寫Arduino程式,遇到一個問題 
 
我的架構大概是這樣 
 
Arduino uno                Selection Valve 
            RX        +        TX         
            TX                RX         
         
程式語言是下方 
 
void setup()  
 
{ 
  // put your setup code here, to run once: 
  Serial.begin(9600);  //記得要設定鮑率 
} 
 
void loop()  
{ 
 // put your main code here, to run repeatedly: 
 
  int list[8]={0,0x0E,'P',2,0,1};//開始.Address_W.Command.Command Value.檢查位元.停止 
 
  int j; 
 
    for(j=0;j<4;j++)    
    {         
          Serial.print(list[j]); 
          Serial.print(" ");  //空格 
    } 
 
    Serial.println("");  //換列   
 while(true);  //控制不會無限迴圈 
} 
 
 
 int list[8]={0,0x0E,'P',2,0,1};//開始.Address_W.Command.Command Value.檢查位元.停止 
我利用陣列方式傳輸寫入的指令,之後直接下Commad與閥門轉到哪個位置的 Command Value 
卻一直無法將選擇閥門轉動,可否各位前輩給我一些建議 
 |   
 
 
 
 |