Changes between Version 31 and Version 32 of wade/embedded/arduino/example/temp


Ignore:
Timestamp:
Jun 7, 2013, 3:21:31 PM (11 years ago)
Author:
wade
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • wade/embedded/arduino/example/temp

    v31 v32  
    790790}
    791791}}}
     792= 程式十五:RS232傳送與接收 =
     793{{{
     794void setup()
     795{
     796  Serial.begin(9600);
     797}
     798
     799void loop()
     800{
     801 
     802 
     803  if (Serial.available())
     804  {
     805    char c = Serial.read();
     806//    Serial.println(c)
     807    if (c == 'a')
     808    {
     809      digitalWrite(13, HIGH);
     810      delay(100);
     811      digitalWrite(13, LOW);
     812      delay(100);
     813      digitalWrite(13, HIGH);
     814      delay(100);
     815      digitalWrite(13, LOW);
     816      delay(100);
     817      digitalWrite(13, HIGH);
     818      delay(100);
     819      digitalWrite(13, LOW);
     820      delay(100);
     821    }
     822   
     823  }
     824}
     825}}}
    792826
    793827[[Image(LED8x8-2.png)]]