You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/hardware/03.nano/boards/nano-matter/tutorials/matter-fan/content.md
+195-1
Original file line number
Diff line number
Diff line change
@@ -17,4 +17,198 @@ software:
17
17
- ide-v2
18
18
- web-editor
19
19
- iot-cloud
20
-
---
20
+
---
21
+
22
+
## Overview
23
+
24
+
This tutorial will teach you how to create a Matter fan for keeping you cool.
25
+
26
+

27
+
28
+
Thanks to the seamless compatibility of the Nano Matter with almost any Matter network we can easily integrate our fan with Amazon Alexa, Google Assistant, Apple Home, Home Assistant and even custom assistants.
-[Arduino IDE 2.0+](https://www.arduino.cc/en/software) or [Arduino Cloud Editor](https://create.arduino.cc/editor)
44
+
-[Google Home App](https://home.google.com/get-app/)
45
+
46
+
### Board Core and Libraries
47
+
48
+
The **Silicon Labs** core contains the libraries and examples you need to work with the board's components, such as its Matter, Bluetooth® Low Energy, and I/Os. To install the Nano Matter core, navigate to **File > Preferences** and in the **Additional boards manager URLs**, add the following:
Now navigate to **Tools > Board > Boards Manager** or click the Boards Manager icon in the left tab of the IDE. In the Boards Manager tab, search for `Nano Matter` and install the latest `Silicon Labs` core version.
53
+
54
+

55
+
56
+
## Project Setup
57
+
58
+
### Schematic Diagram
59
+
60
+
Use the following connection diagram for the project:
61
+
62
+

63
+
64
+
### Programming
65
+
66
+
In the Arduino IDE upper menu, navigate to **Tools > Protocol stack** and select **Matter**.
Serial.println("Starting decommissioning process, device will reboot...");
173
+
Serial.println();
174
+
digitalWrite(LED_BUILTIN, LED_BUILTIN_INACTIVE);
175
+
// This function will not return
176
+
// The device will restart once decommissioning has finished
177
+
Matter.decommission();
178
+
}
179
+
}
180
+
```
181
+
182
+
This is a very simple code that consist of the Arduino basic sketch parts:
183
+
- In the `setup()` function we initialize the Matter connectivity and the fan output pin.
184
+
- In the `loop()` function we listen to any fan control command sent from the smartphone or voice assistant and then adjust the fan speed setting the PWM signal accordingly.
185
+
186
+
Once you uploaded the example code to the Nano Matter, open the Serial Monitor and reset the board.
187
+
188
+

189
+
190
+
There you will find the URL that generates the QR for the Matter device commissioning.
191
+
192
+
### Commissioning
193
+
194
+
Copy and paste the QR code URL on your favorite web browser and a unique QR code will be generated for your board.
195
+
196
+
Go to your **Google Home** app, navigate to **devices** and tap on **Add**, select the **Matter-enabled device** option and scan the QR code.
197
+
198
+

199
+
200
+

201
+
202
+
## Final Results
203
+
204
+
Finally, you will be able to control the fan from your smartphone, hub or asking your personal assistant.
205
+
206
+

207
+
208
+
## Conclusion
209
+
210
+
In this tutorial we have learned how to create a Matter enabled fan that can be controlled from our smartphone and personal assistant. The Nano Matter allows us to seamlessly integrate the fan as a commercial product with our current smart home ecosystem.
211
+
212
+
### Next Steps
213
+
214
+
You can take this solution even further by adding an external knob to adjust the fan speed manually or integrating an AC motor driver to control an actual ceiling fan.
0 commit comments