Experiment 3 Using OLED to display the Resistance of Photoresistor

Share for us

Description: This routine will dynamically display the resistance of photoresistor on OLED with dynamic graphical effects.


SunFounder Uno R3 * 1

0.96 Inch OLED * 1

Photoresistor* 1

10K Ohm Resistor * 1

USB Data Cable * 1

Jumper Wires


First, connect the circuit

         SunFounder Uno                               OLED

         SCL -------------------------------------- SCL

         SDA ------------------------------------- SDA

         3.3V-------------------------------------- VCC

         GND ------------------------------------ GND

The connection between SunFounder Uno and the photoresistor is as shown in figure 20:

Figure 20

The corresponding principle diagram is as shown in figure 21:

Figure 21

Second, program (please go to our official website www.sunfounder.com to download the example code by clicking LEARN -> Get Tutorials)

Third, compile the program

Fourth, burn the program into SunFounder Uno R3 board

You will see the height of bar that is used to indicate light intensity is proportional to light intensity, and the corresponding physical connection diagram is shown as figure 22: