Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
TFT_eSPI
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
TFT_eSPI
Commits
333f0f84
Commit
333f0f84
authored
Aug 14, 2022
by
Bodmer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correct Widget examples
parent
90fe790f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
examples/GUI Widgets/Buttons/Button_demo/Button_demo.ino
examples/GUI Widgets/Buttons/Button_demo/Button_demo.ino
+5
-5
examples/GUI Widgets/Sliders/Slider_demo/Slider_demo.ino
examples/GUI Widgets/Sliders/Slider_demo/Slider_demo.ino
+1
-1
No files found.
examples/GUI Widgets/Buttons/Button_demo/Button_demo.ino
View file @
333f0f84
// Button widget demo, requires display with touch screen
// Button widget demo, requires
SPI
display with touch screen
// Requires widget library here:
// https://github.com/Bodmer/TFT_eWidget
#include
"FS.h"
#include
<FS.h>
#include "Free_Fonts.h" // Include the header file attached to this sketch
#include <TFT_eSPI.h> // Hardware-specific library
...
...
@@ -14,15 +14,15 @@ TFT_eSPI tft = TFT_eSPI(); // Invoke custom library
#define CALIBRATION_FILE "/TouchCalData1"
#define REPEAT_CAL false
TFT_eWidget
btnL
=
TFT_e
Widget
(
&
tft
);
TFT_eWidget
btnR
=
TFT_e
Widget
(
&
tft
);
ButtonWidget
btnL
=
Button
Widget
(
&
tft
);
ButtonWidget
btnR
=
Button
Widget
(
&
tft
);
#define BUTTON_W 100
#define BUTTON_H 50
// Create an array of button instances to use in for() loops
// This is more useful where large numbers of buttons are employed
TFT_e
Widget
*
btn
[]
=
{
&
btnL
,
&
btnR
};;
Button
Widget
*
btn
[]
=
{
&
btnL
,
&
btnR
};;
uint8_t
buttonCount
=
sizeof
(
btn
)
/
sizeof
(
btn
[
0
]);
void
btnL_pressAction
(
void
)
...
...
examples/GUI Widgets/Sliders/Slider_demo/Slider_demo.ino
View file @
333f0f84
...
...
@@ -4,7 +4,7 @@
// https://github.com/Bodmer/TFT_eWidget
#include "FS.h"
#include <LittleFS.h>
#include "Free_Fonts.h" // Include the header file attached to this sketch
#include <TFT_eSPI.h>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment