Changes between Version 6 and Version 7 of rock/note/arduino
- Timestamp:
- Dec 31, 2009, 2:20:31 PM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
rock/note/arduino
v6 v7 68 68 } 69 69 }}} 70 71 [[BR]] 72 == 4.Interfacing with linux == 73 * Arduino 在 linux 上會被視為一個 char device,可以透過簡單的導向功能,把輸入和輸出導向 Arduino 74 {{{ 75 /* 76 * Reflect serial input back. 77 */ 78 void setup() 79 { 80 Serial.begin(9600); 81 } 82 83 void loop() 84 { 85 while (Serial.available() > 0) { 86 Serial.write(Serial.read()); 87 } 88 } 89 }}} 90 [[Image(echo.png,width=300px)]] [[Image(tail.png,width=300px)]] 91 92 93 [[BR]]