/*Header
Writing a code to measure the voltage
within an LED-resistor ciruit
With measured voltage we can use Ohms law (V = IR)
To calcualte
voltage drop across any component
And current through component/circuit
*/
//Global Var and pin designation
int LEDPIN = 13;
int Voltreading;
void setup() {
// put your setup code here, to run once:
pinMode(LEDPIN, OUTPUT);
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite(LEDPIN, HIGH);
Voltreading = analogRead(A0);
Serial.print(Voltreading);
Serial.print(" | ");
delay(100);
}