-
Notifications
You must be signed in to change notification settings - Fork 1
Home
-
Support for multi-page programs
You can add as many as 32767 pages - Support for button, label, check-box, slider and radio-button
-
Ability to include another sketch in the program (experimental)
Just paste the code of the second sketch, rename the functions and variables to avoid conflicts, and callrunsketch(setup,loop) -
Flexibility
You can customize almost everything of the elements.
There are a lot of optional things. -
Automatic font size for buttons
Font size will automatically calculated to fit into the button -
Screen time-out
TFT screen will turn off after inactivity to reduce power usage and avoid image persistance (optional) -
Ease of use
Almost every action only needs one function call, and some of them are automatically done.
And only one configuration is needed for most of the modules (Multi-page, buttons, check-boxes, sliders, screen-timeout, screen brightness, fonts, screen-off animation, touch)
- Reference the library file (library.ino) in your project (e.g.
#include "library.ino") - Copy the contents of config.ino to your sketch (BEFORE THE
#includeSTATEMENT) - Adjust the constants specific to your project.
start(): Inits the TFT screen and draws page 0
navigatePage(): Used to navigate between pages
checkPage(): Call regularly to make your application responsible to touches
addbutton(): Adds a new button
button_pressed[page][index]: Indicates whether a button is pressed
changeButtonProperty(): Modifies a button
addlabel(): Adds a new label
changeLabelXPos(): Changes the X position of a label
changeLabelYPos(): Changes the Y position of a label
changeLabelText(): Changes the text of a label
changeLabelTextColor(): Changes the color of a label
changeLabelFont(): Changes the font object used when drawing a label
changeLabelEnabled(): Disables or enables a label
changeLabelVisible(): Shows or hides a label
changeLabelTextSize(): Changes the zoom of a label (but makes it blocky, because it 'zoom's a raster font)
addcheckBox(): Adds a new check-box
checkbox_checked[page][index]: Indicates whether a check-box is checked
changeCheckBoxXPos(): Moves a check-box to left or right
changeCheckBoxYPos(): Moves a check-box to up or down
changeCheckBoxText(): Changes the text shown beside the check-box
changeCheckBoxSize(): Makes a check-box bigger or smaller
changeCheckBoxCheckColor(): Changes the tick color of a check-box
changeCheckBoxTextColor(): Changes the text color of a check-box
changeCheckBoxBoxColor(): Changes the box background color of a check-box
changeCheckBoxBoxBorderColor(): Changes the box border color of a check-box
changeCheckBoxChecked(): Checks or unchecks the check-box
changeCheckBoxEnabled(): Enables or disables the check-box
changeCheckBoxVisible(): Shows or hides the check-box
addslider(): Adds a new slider
getSliderValue(): Gets the value of a slider
These functions have their specific page as they are a lot.
addradioButton(): Adds a new radio-button
radioButton_checked[page][index]: Indicates whether a radio-button is selected
selectRadioButton(): Selects a radio button, as if it was clicked.
changeBrightness(): Dims or brightens the screen
Centre(): Calculates the required position to center-align an object
calculateListY(): Calculates the Y position of a button in a list of buttons
inRegion(): Returns true if the given coordinate is inside a given range
Touch_getXY(): Reads touch
dim(): Dims an rgb565 color
Reset(): Software-resets the Arduino board. Has no parameters and returns nothing