We can load and run it to communication with Arduino Due board easily.
To load the terminal example:
- Click File on Qt menu, -> select Open File or Project..., browse to load the project file of Terminal example. It should be locate in /Qt/5.1.0/gcc/examples/serialport/Terminal/terminal.pro.
Build and run the example:
Code in Arduino Due:
void setup() {
  Serial.begin(9600);
}
void loop() {
  if(Serial.available() > 0){
    Serial.print('(');
    Serial.print((char)Serial.read());
    Serial.print(')');
  }
}
 
No comments:
Post a Comment