This is a guide showing an easy way to set up an LCD touchscreen interface with arduino, or other similar microcontrollers.

It's also shameless self-promotion of my kickstarter... which focuses on making it super easy to program a nice GUI.

This example is a basic stepper driver control system.

Step 1: Step 1: Parts

For this you need, an LCD screen supported by the software package, currently this is RA8875 based screens but will be expanding to a wider range in future.

A microcontroller, be sure to ensure the voltages match, 5V micros like the Uno will also need a level shifter to run 3.3V screen.

The G2 screen programming code generator software

A few bits of wire.

Whatever else you fancy hooking up to the microcontroller.

Step 2: Step 2: Hardware Hookup

This step is nice and simple. Just connect the power, SPI interface, and touch interrupt pins.

Also add any other hardware your project requires.

Step 3: Step 3: Design the GUI

This is the main bit. It's a drag and drop style interface to put a variety of different widgets/buttons onto the GUI. It also supports multiple windows/tabs so in this example I made main screen, which monitors speed and position, and another screen where you set what the stepper should be doing; with a third for LED control.

The G2 program also has places to insert microcontroller code to be executed on screen events, like pressing a button for example.

A much more comprehensive explanation of the features is over on the kickstarter page

Step 4: Step 4: Upload the Program

The code is generated into an arduino sketch directory; which automatically loads it when the sketch is opened.

A few lines are required to integrate it, a few includes and global vars, a setup function, and a execution function. So it's just like including a library, except the files are project specific and have to be in the sketch directory.

Upload as per normal.

Step 5: Step 5: You're Done!

Pretty simple eh!

I came up with this code generator concept when I had to program up a screen without one. It was quite difficult to do in a neat manner, and quite repetitive and time consuming to setup, even the common libraries out there. As a comparison, that project I did took over 20 hours to get the interface setup we wanted, this one took around ten minutes.

Making modifications is also a breeze, make them in the G2 program just regenerate the code and overwrite those files in your sketch, reload and re-upload it.

<p>I would like to apply your tutorial for this screen:<br><a href="http://www.aliexpress.com/item/For-Arduino-UNO-2-4-inch-TFT-touch-screen-supporting-For-UNO-R3/32254339975.html?spm=2114.01010208.3.265.Oduhje&ws_ab_test=searchweb201556_0,searchweb201602_5_10057_10056_10055_10037_10049_10059_10032_10058_10017_405_404_10060_10061_10062_412,searchweb201603_1&btsid=04450f08-fb75-4cec-ba36-d56e5eaf868c." rel="nofollow">http://www.aliexpress.com/item/For-Arduino-UNO-2-4...</a><br>Do you think its more or less the same work as for your parts?</p><p>How do you make multiple screens?</p><p> Is it possible to change screens with sliding left/right?</p>
<p>No, spfd5408 controller is not supported.</p><p>Hit new window button, and add objects (existing or new) to it.</p><p>No, sliding and moving graphics objects require a different system. This is for simple screen interfaces designed to be lightweight.</p>
<p>Is G2 app still downloadable? It's exactly what I need for my IT assignment coming up (:</p>
<p>Sure is; updated, supported, and downloadable. Tell your whole class :P</p><p>http://www.tawatech.com/G2/G2.html download links at bottom of page.</p>
<p>Awesome, thanks!!</p>
<p>Alpha is now live! Windows standalone deploy at <a href="http://www.tawatech.com/G2/G2.html" rel="nofollow">http://www.tawatech.com/G2/G2.html </a> (github link near bottom of page).</p><p>There will be bugs, sign up on our forums, help test, and you'll probably get a free copy (lifetime updates).</p>
<p>Great job! . Is the G2 app still available?</p>
<p>I've been working a little bit on making an early alpha version available. The code is almost there, and I need to set up a landing page and feedback/questions/faqs bit on my site for it.</p><p>Will bump it up the priority list and try and get that done this month.</p>
<p>Cool. You have a price in mind? What platform? Windows? </p>
<p>It'll be annoying trial (mandatory welcome screen and limited compiles per hour or something) while under development, which can be removed by getting the paid version (lifetime updates) for like 20 bucks.</p><p>I've got forums up, and G2 page almost up on my site, www.tawatech.com</p>
<p>And yeh, windows only for now, other platforms will be doable, but I think I'll get it more stable and feature-complete before attempting to release it for that.</p>
<p>great job,so amazing</p>
<p>A touch screen could really improve a lot of my Arduino projects. </p>

About This Instructable




More by john.howarth.10:Simple LCD touchscreen for arduino 
Add instructable to: