Skip to content

Commit a8f3bfe

Browse files
authored
Add files via upload
1 parent e120d41 commit a8f3bfe

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

examples/Trigger/TriggerCode/TriggerCode.ino

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@
2121

2222
/* This is the most important method of the library.
2323
* And this is because, it gives you the ability to use the predefined functions and run your code from there.
24-
* These predefined functions are named trigger1(), trigger2(), trigger3()... up to trigger50().
24+
* These predefined functions are named trigger0(), trigger1(), trigger2()... up to trigger50().
2525
* You can use them as a simple void out of the loop, in which you will have written a block of code to run every time it is called.
2626
* You can call those trigger() functions and run the code they contain anytime by simply writing in a Nextion Event the command:
2727
* `printh 23 02 54 XX` , where `XX` the id for the triggerXX() in HEX.
28-
* Example: printh 23 02 54 01 to call trigger1() ... printh 23 02 54 0A to call trigger10() and so on...
28+
* Example: printh 23 02 54 00 to call trigger0() ... printh 23 02 54 0A to call trigger10() and so on...
2929
*/
3030

3131
/*
3232
Declare the void by simply writing:
33-
void trigger1(){
33+
void trigger0(){
3434
[ put your code here !!!!]
3535
}
3636
*/
@@ -53,8 +53,8 @@ void loop(){
5353
// from Nextion touch panel. Actually, you should place it in your loop function.
5454
}
5555

56-
void trigger1(){
57-
// To call this void send from Nextion's component's Event: printh 23 02 54 01
56+
void trigger0(){
57+
// To call this void send from Nextion's component's Event: printh 23 02 54 00
5858
// In this exmaple, we send this command from the Release Event of b0 button (see the HMI of this example)
5959
// You can send the same `printh` command, to call the same function, from more than one component, depending on your needs
6060

@@ -71,8 +71,8 @@ void trigger1(){
7171
}
7272
}
7373

74-
void trigger2(){
75-
// To call this void send from Nextion's component's Event: printh 23 02 54 02
74+
void trigger1(){
75+
// To call this void send from Nextion's component's Event: printh 23 02 54 01
7676
// In this exmaple, we send this command from the Release Event of b1 button (see the HMI of this example)
7777
// You can send the same `printh` command, to call the same function, from more than one component, depending on your needs
7878

0 commit comments

Comments
 (0)