//int moodlevel = 5;
//void setup() {
//Serial.begin(115200);
//Serial.println("hello");
//delay(1000);
//Serial.println("tris how are you today?");
//delay(2000);
//Serial.print("what is your oodlevel today?");
//delay(1000);
//Serial.print(moodlevel);
//}

//void loop() {
//}
//
  
//println 與print的區別是隔行與否

void setup() {
  Serial.begin(115200);//启动串口通讯!如果想arduino根據你輸入的資料已做控制,例如輸入0的數字控制13脚位亮起,必須啓動串口通信
  Serial.println("HELL0");
}
void loop(){
  if(Serial.available()){ //arduino需要讀取你的資料所以要加入available
    char ch = Serial.read();//因爲你輸入的是字符或者英文所以應用char去讀取

    if (ch == '0'){//輸入0, 13脚位就會里亮起
      digitalWrite(13, HIGH);
    }
      else if (ch == 'C'){ //輸入C10脚位就會亮起
        digitalWrite(10, HIGH);
      }
      else{
        //Serial.println("invaild character");
        //digitalWrite(13, LOW);
        //digitalWrite(10, LOW);
      }
  }
}