Friday, July 5, 2013

Qt Terminal example work with Arduino

The new released Qt 5.1 come with a number of examples, Terminal is one of them. The Terminal example shows how to create a terminal for a simple serial interface by using Qt Serial Port. It shows the main features of the QSerialPort class, like configuration, I/O implementation and so forth. Also, the class QSerialPortInfo is invoked to display information about the serial ports available in the system.

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(')');
  }
}



Qt 5.1

New Qt 5.1 is available Now: What's New in Qt 5.1

Qt 5.1 is a Modern Multi-Platform Way of Writing Applications

Qt 5.1 is the latest release of the cross-platform C++ Application and UI framework. Qt 5.1 solidifies the modern multi-platform way of writing applications with Qt 5 by adding more flesh to the bone by boosting the UI technology and performance. You can now create native Qt-based cross-platform applications all with one framework and target all the most popular operating systems on desktop, embedded and mobile.

The central UI technology of Qt, Qt Quick, takes a big step forward with a new layout support and Qt Quick Controls, a pre-built toolbox of re-usable UI controls on top of the declarative QML language.

In Qt 5.1, these controls are supported on all desktop operating systems providing native look-and-feel. In the coming months, we will introduce support for touch-based controls and mobile look-and-feel. As sugar on top, Qt 5.1 presents technology previews of the official Qt ports on Android and iOS allowing you to start your multi-platform story on mobile as well.

Qt 5 Everywhere Demo

Check out the “Qt Everywhere” demo launcher showing various features of Qt 5.1 running with the same UX on Windows, Linux, Mac, embedded Linux (i.MX 6), Windows 8 and Android - true cross-platform development with the same code.



Qt 5.1 come with a The Terminal example to show how to create a terminal for a simple serial interface by using Qt Serial Port. We can load and run it to communication with Arduino Due board easily. read: Qt Terminal example work with Arduino