Develop GUI interface for a microcontroller as arduino or similar

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

  1. erotavlas

    erotavlas

    Joined:
    Apr 19, 2017
    Messages:
    2
    Likes Received:
    0
    Hi,
    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 https://micropython.org/ and this project https://openmv.io/ 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
     
    erotavlas, Apr 19, 2017
    #1
    1. Advertisements

  2. erotavlas

    Harald Kapp Moderator Moderator

    Joined:
    Nov 17, 2011
    Messages:
    7,602
    Likes Received:
    1,336
    Location:
    Germany-Europe-Earth-Sol System-Milky Way-Laniakea
    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.
     
    Harald Kapp, Apr 19, 2017
    #2
    1. Advertisements

  3. erotavlas

    Doug3004

    Joined:
    Sep 5, 2014
    Messages:
    73
    Likes Received:
    16
    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.
     
    Doug3004, Apr 28, 2017
    #3
    Harald Kapp likes this.
  4. erotavlas

    Irv

    Joined:
    Jun 7, 2017
    Messages:
    108
    Likes Received:
    28
    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.
     
    Irv, Jun 8, 2017
    #4
  5. erotavlas

    erotavlas

    Joined:
    Apr 19, 2017
    Messages:
    2
    Likes Received:
    0
    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
     
    erotavlas, Jun 16, 2017
    #5
    1. Advertisements

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.