Arduino 課後補充

November 7, 2012   ·   0 Comments

Screen Shot 2012-11-07 at 1.59.37 PM

課程中寫的sample code: http://www.powenko.com/download/arduino_samples.zip

Android IOIO

https://github.com/ytai/ioio

DFRobot – USB Host Shield for Arduino (Suppot Google ADK)

http://robosavvy.com/store/product_info.php/products_id/1859/currency/USD

Amarino , android meets ardiono

http://code.google.com/p/amarino/

http://search.ruten.com.tw/search/s000.php?searchfrom=indexbar&k=arduino&t=0

http://code.google.com/p/unity-arduino-serial-connection/

可變電阻:

 

int sensorPin = A0;    // select the input pin for the potentiometer
int ledPin = 13;      // select the pin for the LED
int sensorValue = 0;  // variable to store the value coming from the sensor

void setup() {
  // declare the ledPin as an OUTPUT:
  pinMode(ledPin, OUTPUT);  
  Serial.begin(9600); //設定SerialPort的速度9600 = 9600bit/s
}

void loop() {
  
  // read the value from the sensor:
  sensorValue = analogRead(sensorPin);   
  Serial.println(sensorValue); //印出數值在Serial.Monitor 
  if(sensorValue>50){
    digitalWrite(ledPin, HIGH);  
  }else{   
    digitalWrite(ledPin, LOW);  
  }

  
}

shareShare on FacebookShare on Google+Share on LinkedInEmail this to someonePrint this pageBuffer this pageDigg thisFlattr the authorShare on RedditPin on PinterestShare on StumbleUponShare on TumblrTweet about this on Twitter

By


Readers Comments (0)


You must be logged in to post a comment.

PowenKo’s Online Store

powenko_arduinoBook

Amazon

adsbygoogle

Recent Posts

Categories

Amazon