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

Software Preparation

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:

Connection

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.

Result

Was this article helpful?

TOP