Example Code for Arduino-Serial Output
Last revision 2025/12/19
Write an example program using Arduino IDE, burn it to the Arduino controller, and observe the serial port output results.
Hardware Preparation
- 1 x DFRduino UNO R3
- 1 x IO Expansion board
- 1 x Thin-film pressure sensor
- 1 x Digital cable
Software Preparation
Wiring Diagram
Connect the sensor to the A5 pin on the expansion board.

Sample Code
void setup() {
Serial.begin(9600);
}
void loop(){
Serial.println(analogRead(A5));
delay(500);
}
Result
| When no pressure is detected | ![]() |
![]() |
|---|---|---|
| When pressure is detected | ![]() |
![]() |
Was this article helpful?




