Coding
Arduino
Circuit
Connect the cables to the Arduino as shown below.
- Black: GND
- Red: 5V
- Blue: A4
- Green: A5
Code
- Install Arduino IDE from here.
- Download the code. On the new page, right click and click "Save as".
- Upload the code to the Arduino board.
Data Plotting
To visualize the data, turn on the Serial Plotter from Tools > Serial Plotter.