Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Vres = Vcc*(R2/(R1+R2))

Vres = Resultierende SpannungResulting Voltage 
Vcc = Anliegende Spannung Input voltage (5V)
R1 = Erster Widerstand (Fotoresistor1st resistor (Photoresistor in our case)
R2 = Zweiter Widerstand 2nd resistor (Festwiderstand)Für unseren Fotoresistor ergibt sich also folgende Schaltung…Fixed resstiro)

For our photoresistor there is the following circuit: 


Example-Code

For the code, let's output the values read from Arduino via the Serial Monitor (see: Serial).

...