Connect with us

Develop GUI interface for a microcontroller as arduino or similar

Discussion in 'Microcontrollers, Programming and IoT' started by erotavlas, Apr 19, 2017.

Scroll to continue with content
  1. erotavlas


    Apr 19, 2017
    I'm new of this forum. I'm looking for a software/library that allows to create a simple GUI (buttons, check box, menù, etc.) that is able to realize a function with a microcontroller as arduino (switching on a light, powering a motor, etc.).
    I know these projects: processing (java), wiring (C++), fritzing. Moreover, for python I found this project and this project tailored to solve computer vision problems with microcontroller.
    Do you know about similar project? What is the best in your opinion? I would like to use it in a secondary school.

    Thank you
  2. Harald Kapp

    Harald Kapp Moderator Moderator

    Nov 17, 2011
    While an arduiono or the like are well suited for the controller part of your project, they are (imho) not the best solution for being controlled by a GUI as you will have to add all the harware to control a monitor and an input device (e.g. keyboard, mouse).
    A raspberyy Pi is better suited, especially aas your primary concern seems to be the teaching the principles in secondary school. On the raspberry Pi you can run a pre-configured Linux. For the hardware part a standard monitor with HDMI input plus a USB keyboard and mouse are sufficient. Thus you have a working hardware/software system as the basis for your projects while still having access to the GPIO pins for input and output purposes.
    A quick entry to programming the Raspberry Pi is by using python. You can find many sample projects on the internet for this HW/SW combination.
  3. Doug3004


    Sep 5, 2014
    The Henning Karlsen (sp?) libraries for touch screens have a demo that provides on-screen buttons. I believe it uses a library to create and manage the buttons, but I don't recall the details right off.

    A lot of the 'better' Arduino libraries are very heavily optimized and aren't real easy for a beginner to understand. All you do to make touch-screen "buttons" is draw a rectangle and then (in the main program loop) you check where a screen-touch occurs. If it's within the four borders of the rectangle, then you call a desired function.

    I have used some of the touch-screen TFT screens in arduino projects, and found that getting touch-screen input can take rather a lot of time, relatively speaking... In a time-sensitive task, the arduino will stutter while getting screen input (whenever the screen is being touched). It's much faster to get a binary level from a mechanical button; they do not cause the same stuttering issue at all.

    But labeling mechanical buttons is often problematic, especially if you need a program that has a LOT of buttons.... Nice buttons with clear keycaps tend to be rather expensive.

    So what I advise here is, to position the touch-screen in portrait mode and put two rows of mechanical buttons down along both sides of the screen, and poll them through a shift register or a multiplexer. This way, you can use plain buttons and place text on the screen next to them saying what they do, and you can still use on-screen buttons if you need to.
    I have one project that uses an Arduino Mega with a 7" touch screen to run two stepper motors. The touch-screen has a GUI with 7 tabs and probably 40+ buttons over all the tabs. The touch-screen interface is fantastic in making the thing much more easier to use, but the code for the GUI is about 90% of the total (270 kb total for the .ino files). The part that actually runs the motors is really quite small.
    Harald Kapp likes this.
  4. Irv


    Jun 7, 2017
    There are a number of projects which combine small Arduinos with tablets/smartphones/pcs running a web browser as the "front panel" for input/output. The Arduino runs a tiny web server to serve a page with html5 controls, and reads the "post" results, then sets hardware (leds, servos, etc.) With a little knowledge of html, you can pretty much design any control or readout you want. This apparently works even with the simpler Uno and Nano boards, which don't have the processing power to drive regular displays.
  5. erotavlas


    Apr 19, 2017
    Thank you for the answers.
    I found the best solution, I think. I'm going to use Qt designer together with python libraries through pyqt5 library and with raspberry pi.
    Best Regards
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day