Description: In this routine, we will let OLED dynamically display acceleration values from 3-axis acceleration sensor ADXL345 with dynamic graphical effects.
Components:
SunFounder Uno R3 * 1
0.96 Inch OLED * 1
ADXL345 * 1
USB Cable * 1
Jumper Wires
Steps:
First, connect the circuit
SunFounder Uno ADXL345 OLED
5V ----------------------------------- +
GND --------------------------------- “-“ --------------------- GND
3.3V ----------------------------------------------------------- VCC
SCL ------------------------------------SCL-------------------- SCL
SDA ---------------------------------- SDA ------------------- SDA
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
If everything goes well, you will see the OLED dynamically display the values of X, Y, Z axis measured by 3-axial acceleration sensor in real-time, the physical diagram is shown as figure 26: