Files
esp-rainmaker/examples/fan
Piyush Shah 229713488c examples: Enable some security features and change order of component dirs
Features now enabled by default are:

- User id check in user-node association for better handling of reset to
factory from security perspective.
- Secure local control

Order of component dirs has been changed so that the rmaker_common from
esp-rainmker gets used, rather than the one from esp-insights
2022-01-25 13:59:28 +05:30
..
2021-09-09 10:53:31 +05:30

Fan Example

Build and Flash firmware

Follow the ESP RainMaker Documentation Get Started section to build and flash this firmware. Just note the path of this example.

What to expect in this example?

  • This example uses the BOOT button and RGB LED on the ESP32-S2-Saola-1/ESP32-C3-DevKitC board to demonstrate a fan.
  • The LED brightness indicates the speed of the Fan.
  • Pressing the BOOT button will increase the speed by 1. The speed will cycle from 0 to 5 and then come back to 0.
  • Toggling the button on the phone app should toggle the LED on your board, and also print messages like these on the ESP32-S2 monitor:
I (16073) app_main: Received value = true for Fan - power
  • You may also try changing the speed from the phone app.

LED not working?

The ESP32-S2-Saola-1 board has the RGB LED connected to GPIO 18. However, a few earlier boards may have it on GPIO 17. Please use CONFIG_WS2812_LED_GPIO to set the appropriate value.

Reset to Factory

Press and hold the BOOT button for more than 3 seconds to reset the board to factory defaults. You will have to provision the board again to use it.