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.
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).
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.
1 of 1 people found this helpful
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.