File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
libraries/Matter/examples/MatterLambdaSingleCallbackManyEPs Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 12
12
// See the License for the specific language governing permissions and
13
13
// limitations under the License.
14
14
15
+ /*
16
+ This example create 6 on-off light endpoint that share the same onChangeOnOff() callback code.
17
+ It uses Lambda Function with an extra Lambda Capture information that links the Endpoint to its individual information.
18
+ After the Matter example is commissioned, the expected Serial output shall be similar to this:
19
+
20
+ Matter App Control: 'Room 1' (OnOffLight[0], Endpoint 1, GPIO 2) changed to: OFF
21
+ Matter App Control: 'Room 1' (OnOffLight[0], Endpoint 1, GPIO 2) changed to: ON
22
+ Matter App Control: 'Room 5' (OnOffLight[4], Endpoint 5, GPIO 10) changed to: ON
23
+ Matter App Control: 'Room 2' (OnOffLight[1], Endpoint 2, GPIO 4) changed to: ON
24
+ Matter App Control: 'Room 4' (OnOffLight[3], Endpoint 4, GPIO 8) changed to: ON
25
+ Matter App Control: 'Room 6' (OnOffLight[5], Endpoint 6, GPIO 12) changed to: ON
26
+ Matter App Control: 'Room 3' (OnOffLight[2], Endpoint 3, GPIO 6) changed to: ON
27
+ Matter App Control: 'Room 5' (OnOffLight[4], Endpoint 5, GPIO 10) changed to: OFF
28
+ */
29
+
15
30
// Matter Manager
16
31
#include < Matter.h>
17
32
#include < WiFi.h>
You can’t perform that action at this time.
0 commit comments