Example Code for Arduino-LattePanda Communication
Last revision 2025/12/24
This tutorial will demostrate how to make LattePanda V1 communicate with Arduino via the shield.
Hardware Preparation
- DFR0216 DFRduino UNO R3 (or similar) x 1
- DFR0258 RS232 Shield for Arduino x1
- LattePanda V1 x1
- DFR0734 RS232 Connector Expansion Shield for LattePanda V1 x1
- RS232 Data Cable (Male to male) x1
Software Preparation
- Download Arduino IDE: Click to download Arduino IDE
Connection Diagram
- Plug the Arduino RS232 shield onto the Arduino Maincontroller
- Plug the LattePanda RS232 shield onto the LattePanda Board
- Connect the two boards with the RS232 data cable, as shown beblow:

Sample Code
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
while(!Serial);
}
void loop() {
// put your main code here, to run repeatedly:
if(Serial.available()>0){
char a;
a = Serial.read()+1;
Serial.print(a); //return all the data that received from LP
}
}
Result
Open the LattePanda serial Monitor, select COM1, and set baud rate to 115200. Send data to Arduino, then it will return after plus 1.

Was this article helpful?
