G2 - Graphically Graphical LCD programming for Arduino
Design your own screen layouts for LCD touchscreens! Customize button/widget colors. Drag in and drop widgets like you are used to.
What does it do?
With this program you can create a GUI (graphical user interface) full of buttons, sliders, and other widgets for display on a LCD screen connected to a microcontroller (e.g. Arduino).
Example steps for an Arduino based LCD project.
- Design and draw up a GUI in the program using the widgets provided.
- Assign C++ commands (the same commands you would use in the Arduino SDK) to these buttons and other display items. The widgets function without these commands of course, but they would not do much.
- Generate the code to your Arduino project directory with the .ino file.
- Drop a few lines of code into the arduino sketch to include, initialize and run the screen, the upload it for a running GUI.
To refresh with any GUI design changes, make them in your G2 LCD project, regenerate the files into your project directory, reload the project, and hit upload.
The project image was a design template made in a graphics program, below is a photo of how close the program is currently capable of getting to that. The project image is a design template instead of this photo of the LCD because a photo simply can't capture the vibrancy of the LCD.
The main differences are with the text, as there are limited fonts and sizes supported by this screen.
The program also generates its own preview of course.
What are the hardware requirements?
We are not a hardware manufacturer and do not want to sell you hardware, so we can choose to support hardware that is of the best value to you. Currently we have developed on an Arduino Due and Due Compatible, and an Adafruit RA8875 display driver chip and a similar RA8875 display unit from alixpress. A complete package priced from as low as $40USD!
Widgets are the buttons, display items and anything else that can be dragged and dropped onto an LCD layout.
Basic Level Widgets
While there is not many, and they are not the prettiest widgets, there is very little you can't do with just the basics.
Advanced Level Widgets
Backers who receive beta level package can upgrade to these at a later date for $25 (approx 16USD).
Advanced widgets are for when form is important, or when function is intricate.
Users with the advanced widgets unlocked can also add their own widgets, through an xml scripting system.
For Makers of all levels and even Professionals
If you can use the Arduino IDE, you can use this program. You don't need to know all about the C++ classes and structs and pointers this relies on. However, the generated code is well annotated and can be modified if you have very specific requirements which are not supported. And the program itself has many places to write C++ code which can be parsed and put into the generated files. The running GUI code requires just one function call, setup is another single function call.
How it works
This software is designed to be very object oriented, and uses object abstraction with regards to hardware.
The hardware configuration is very simple, your screen (or screen controller + screen) is wired to the microcontroller, which is then wired to anything else it needs to be, as per normal.
The object oriented nature of the software structure means is the generated code will always use basic C++, and will run on any (the vast majority) microcontroller that supports this. All those Arduinos so popular with makers will work just fine.
The generated class files are the main part of this system. The main microcontroller file initializes this in the standard fashion. It must also periodically call a display scan function to update and perform any display functions. Display functions like changing the menu, registering a button press; and even using the micro's digital I/O. This function call can also return an integer to represent data the microcontroller code should act on; these will generally be higher level functions as simple I/O can be more easily performed from within the generated class.
On the other side the screen requires another library class to interpret the basic commands from the generated code. These commands are things like; draw a rounded rectangle here, draw this text, draw these lines, etc, and also touch commands if the screen supports it. Most screens cannot do this directly, but any of these methods can be simplified down as required, right down to a draw this pixel which makes up part of this bordered rounded rectangle. This down-simplification will always be the same for a specific screen, thus a static library class can be written to do it, and be completely transparent to the user. So, we expect to add more and more of these screen specific libraries as we add more and more display units over time.
Each supported LCD will have instructions on what code to add to your sketch (only a few lines), common wiring configurations for the device, which is really all you need to get a GUI running.
The following video shows the process of adding inputs and output through the screen using basic arduino functions. It's a bit longer than the Project Video but will give you a better idea how the software is used.
Program interface may be subject to change over the course of this project.
- Hobby projects like a servo controlled laser pointer
- Automation projects like pump and valve control for your sprinkler or fountains
- Multi-screen projects like home lighting control.
- Whatever else you can think of!
Faster Development! No wiring needed to add another button or led.
More I/O! SPI capable displays can use fewer than 6 I/O pins.
Potentially Lower Component Cost! With an LCD screen you have a flat rate cost of hardware, 1000 buttons cost the same as 1.
Waterproof! No, not my demo one, but an LCD is suitable for waterproofing, flush mount the LCD within a waterproof enclosure then place a clear film across the LCD and enclosure. The touch functions will still work, and water will not be able to enter.
It Just Looks Better! Using a touchscreen creates a modern and sophisticated look for the device.
10k In-built calibration function. Assign a button to this and a screen will pop up to click on a number of points, which then calculates the calibration data for the touchscreen. This can be saved to ROM if available, or recorded and written into the program.
15k Dial display widgets. Common dial types to make your project look really good, including needle and fill style dials.
20k Picture object. An rgb image stored in program memory or on an SD card if available. Used as a background or in picture buttons.
25k Keyboard. A pop up keyboard for text entry and text entry boxes.
30k Open source. At the conclusion of this project's development it will be released as open source. This is expected to be in Q1 of 2016. Backers will still get earlier release versions at the specified times.
35k Comprehensive open source documentation. Including xml scripting guides for both the creation of new widgets, and the addition of widget functionality. Support in a web forum with regular developer Q&A access.
So what is all this money for?
The funds raised will cover my time (both already spent, and still required) to make this into quality software. The stretch goals are where I stand to make a little profit, with the open source goal set where I feel is a decent value for the project; from which it can then grow into something even better with community involvement.
What's in a name?
Risks and challenges
This is a very low risk project, because I already have a working prototype; and the cost of software distribution is very low.
The only risks to going forward are the addition of extra functionality/stability, and the addition of more hardware support. These are low risk due to the modular way the software has been designed.
Another risk I am mindful of is software piracy, and the steps required to prevent this; as it could detract from the user experience. Things like software activation delays, always/periodically online licensing checks. In this respect (and a few others) I consider the best project outcome to reach the open source stretch goal.Learn about accountability on Kickstarter
- (30 days)