Video Sites NCECAYoutubeIndex not maintained
Thai w0it |
Main /
ReadLEDReadLED, Print to Serial /* Reads the voltage through the input LED reports it over the serial port. Postive lead of LEAD to pin A5 Negative to pin 5V
// the setup routine runs once when you press reset: void setup() { // initialize serial communication at 9600 bits per second:
Serial.begin(9600);
// make the LED input pin an input:
pinMode(LEDinput?, INPUT);
} // the loop routine runs over and over again forever: void loop() { // read the state of the LED input pin. 0 is zero volts. 1023 is 5 volts. int LEDlevel? = analogRead(LEDinput?); // print out the state of the pin from 0 -1023 : Serial.println(LEDlevel?); delay(1); // delay in between reads for stability } //_________________________________________________________ |