5 Replies Latest reply on Apr 14, 2014 6:14 AM by Cyrus

    Intel galileo display (Multiple mPCIe) with C

    Cyrus

      Hallo,

       

      I'm trying to attach a touchscreen to my intel Galileo board. As I see from the documentation, none of the related Arduino shields are yet supported by the Galileo board.

      Are there any other options?

      1- I'm thinking of using a mPCIe graphics card. Is there any card supported or recommended. Another problem is that I need WiFi, so I wonder whether we can use more than one mPCIe with the same board.

       

      2- ezLCD-301-DK  also sounds like an option. however expensive.

       

      3- A third option could be to connect to a smartphone using ethernet or USB.

       

      I'm also using C language to program the board, and I was wondering if there is any C library or any other way to control the pins and the shields using C.

       

      Does anyone know how to do that?

        • 1. Re: Intel galileo display (Multiple mPCIe) with C
          dferyance

          It depends on how much effort you are willing to put into it and what you want to use the touchscreen for. While touchscreens aren't officially supported by the Arduino libraries this doesn't mean they won't work. I have successfully gotten the http://www.adafruit.com/products/1651 screen working. It got it working both by modifying an Arduino library but, more importantly, through a Linux framebuffer driver. I used the fbtft driver for the display and wrote my own driver for the touchscreen SPI chip. This was difficult, has many limitations, but was doable.

           

          I also seem to remember someone using a USB touchscreen in this forum. I tried searching and didn't find it though.

           

          Using VNC is an option. There is a post about how to do it in this forum. From that you can have display an input driven by another device such as the smartphone you mentioned.

           

          The Arduino libraries, including the Intel ones, are C++. So while not C, they are good starter libraries for controlling the board. They mostly wrap the user-mode Linux devices that control the hardware. So you can use read/write and ioctl as well. Also there is an Intel IOT toolkit that includes a Linux image for doing C++ development and debugging through Eclipse. I haven't used it, but from the tutorial video it looks quite nice.

          • 2. Re: Intel galileo display (Multiple mPCIe) with C
            Cyrus

            Thanks for the reply.

            First I think I can switch to C++, and second I need the touchscreen to simply display some on/off button.

            Sharing how to do this with 2.8 TFT Touch Shield for Arduino v2 ID: 1651 - $39.95 : Adafruit Industries, Unique & fun DIY electronics and kits and using C++ or C would be really useful (including the drivers for both the display and touch screen). If you think it will work for me (on/off button probably showing that the button is now on or off).

            • 3. Re: Intel galileo display (Multiple mPCIe) with C
              dferyance

              For getting the display working, here is the write-up I did on it: https://communities.intel.com/message/225212#225212

              My touchscreen driver isn't yet to the point where I am comfortable with sharing it. I just got the basic cursor moving and clicks working this past weekend. The code is a mess and really pegs the CPU. Unfortunately, I am going to be tied up with a big project for my job for a while so I will have to take a break from working on this.

               

              The touchscreen project I am working on is similar to what you describe. I have a user interface with a few buttons and some simple state. I expect it will work for that. The screen latency is pretty high though. It is not quick and responsive like a tablet is. It isn't a huge delay but even small delays are easily noticed within user interfaces.

               

              Search the forums for information about doing native C/C++ programming. There are a few different options from cross compiling to compiling directly on the Galileo. There has been good work done on creating more full-featured Linux images and making other libraries available. There are also good examples of how to use the linux device drivers from user mode. My recommendation to add to this is to take advantage of the Arduino C++ libraries. They are included with the Intel Arduino install. They can be used directly in a C++ program or copy/paste snippets out of it. I was able to build up my touchscreen driver by doing this kind of reuse.

              • 4. Re: Intel galileo display (Multiple mPCIe) with C
                dferyance

                I updated my post on how to get the Adafruit display working and attached a touchscreen driver (linked in my above post). It seems to run fine with a basic UI with touchscreen buttons. The input latency isn't too bad, the slowest part is the screen re-painting. It still uses polling but I have it pretty balanced that it shouldn't impact performance much.

                1 of 1 people found this helpful
                • 5. Re: Intel galileo display (Multiple mPCIe) with C
                  Cyrus

                  Thanks for the help. I think I'll try your driver