Testing Code

/*
  AnalogReadSerial
 Reads an analog input on pin 0, prints the result to the serial monitor 
 
 This example code is in the public domain.
 */

void setup() {
  Serial.begin(9600);
}

void loop() {
  int sensorValue = analogRead(A0);
  Serial.println(sensorValue, DEC);
  delay(10);
  if(sensorValue > 700){
    digitalWrite(13, HIGH);
  }
  else {
    digitalWrite(13, LOW);
  }
}
 
start/classes/principlesofdesign/arduinogames/testing_code.txt · Last modified: 2012/03/08 17:46 by jonathanyong
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki