發送端 sender:
/* * arduino 讀取 pin 5 這顆 sensor 資料,再寫入 serial */ #define sensorIn 5 int val = 0; void setup() { Serial.begin(9600); } void loop() { val = analogRead(sensorIn); Serial.println(val); // Serial.write("test\n"); delay(100); }
接收端 receiver:
tail -f /dev/ttyUSB0
Last modified 15 years ago
Last modified on Mar 5, 2010, 2:30:38 PM