The following diagram shows a simple two-resistor voltage divider circuit. Our resistor values are fixed for this example to illustrate the basic principle. Notice that we've used 5 volts in this example. The reason for this will be revealed shortly when we cover logic-level conversion:
It's a principle of electronics and resistors that voltage is dropped across series resistors in proportion to their resistance. In the preceding circuit, R1 is twice as high as R2, so it drops twice as much voltage. Here is the basic formula, as applied to the preceding circuit (it's actually the application of Kirchhoff's Law and Ohm's Law again):
Vout = 5 volts x 2000Ω / (1000Ω + 2000Ω)
Vout = 3.33333 volts
We'll see the application of voltage dividers in Section 3, IoT Playground – Practical Examples to Interact with the Physical World, but for now, to...