Arduino Tutorial 2/14

August 8, 2012   ·   0 Comments

debug


void setup() {
  // initialize serial communication at 9600 bits per second:
  Serial.begin(9600);
}

int a1=0;
// the loop routine runs over and over again forever:
void loop() {
  
  Serial.println("hi");
  Serial.print("a1:");
  Serial.println(a1);
  a1=a1+1;

}

ometmer
可變電阻
analog.read



// the setup routine runs once when you press reset:
void setup() {
  // initialize serial communication at 9600 bits per second:
  Serial.begin(9600);
}

// the loop routine runs over and over again forever:
void loop() {
  // read the input on analog pin 0:
  int sensorValue = analogRead(A0);
 
  Serial.println(voltage);
}
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
Hardware22

Hardware

Amazon

adsbygoogle

Recent Posts

Categories

Amazon