Changes between Version 22 and Version 23 of wade/embedded/arduino/example/temp
- Timestamp:
- Jun 7, 2013, 11:39:44 AM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
wade/embedded/arduino/example/temp
v22 v23 573 573 }}} 574 574 575 = 程式十一:x-y 搖捍帶按鍵 = 576 {{{ 577 void setup() { 578 pinMode(3, INPUT); 579 digitalWrite(3, HIGH); 580 Serial.begin(9600); 581 582 } 583 584 void loop() { 585 // put your main code here, to run repeatedly: 586 int val_x = analogRead(0); 587 int val_y = analogRead(1); 588 int input1 = digitalRead(3); 589 Serial.print("sw: "); 590 Serial.print(input1); 591 Serial.print(" x: "); 592 Serial.print(val_x); 593 Serial.print(" y: "); 594 Serial.println(val_y); 595 delay(300); 596 597 } 598 }}} 599 575 600 [[Image(LED8x8-2.png)]]