Recent Changes - Search:

Video Sites

NCECAYoutubeIndex not maintained

Thai

w0it

pmwiki.org

edit SideBar

ReadLED

ReadLED, 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
  • /

int LEDinput? = A5;

// 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

} //_________________________________________________________

Edit - History - Print - Recent Changes - Search
Page last modified on November 16, 2021, at 12:00 AM