Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: espressif/arduino-esp32
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: shahpiyushv/arduino-esp32
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: bugfix/rmaker_readme
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on May 13, 2021

  1. Copy the full SHA
    64da06f View commit details
Showing with 21 additions and 15 deletions.
  1. +17 −15 libraries/RainMaker/examples/RMakerCustom/README.md
  2. +4 −0 libraries/RainMaker/examples/RMakerSwitch/README.md
32 changes: 17 additions & 15 deletions libraries/RainMaker/examples/RMakerCustom/README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
# ESP RainMaker Switch
# ESP RainMaker Custom Device

This example demonstrates how to build a switch device to be used with ESP RainMaker.
This example demonstrates how to build a custom device to be used with ESP RainMaker.

## What to expect in this example?

- This example sketch uses the on board Boot button and GPIO16 to demonstrate an ESP RainMaker switch device.
- This example sketch uses the on board Boot button and GPIO16 to demonstrate an ESP RainMaker AC dimmer device.
- After compiling and flashing the example, add your device using the [ESP RainMaker phone apps](https://rainmaker.espressif.com/docs/quick-links.html#phone-apps) by scanning the QR code.
- Toggling the state from the phone app will toggle the switch state (GPIO16).
- Pressing the Boot button will toggle the switch state (GPIO16) and the same will reflect on the phone app.
- Toggling the state from the phone app will toggle the dimmer state (GPIO16).
- Pressing the Boot button will toggle the dimmer state (GPIO16) and the same will reflect on the phone app.
- You can also change the Level from the phone app and see it reflect on the device as a print message.

### Output

```
[ 63][I][RMaker.cpp:13] event_handler(): RainMaker Initialised.
[ 69][I][WiFiProv.cpp:158] beginProvision(): Already Provisioned
[ 69][I][WiFiProv.cpp:162] beginProvision(): Attempting connect to AP: Viking007_2GEXT
[ 87][I][RMaker.cpp:13] event_handler(): RainMaker Initialised.
[ 94][I][WiFiProv.cpp:158] beginProvision(): Already Provisioned
[ 95][I][WiFiProv.cpp:162] beginProvision(): Attempting connect to AP: Viking007_2GEXT
Toggle State to false.
[ 8182][I][RMakerDevice.cpp:162] updateAndReportParam(): Device : Switch, Param Name : Power, Val : false
Received value = false for Dimmer - Power
Toggle State to true.
[ 9835][I][RMakerDevice.cpp:162] updateAndReportParam(): Device : Switch, Param Name : Power, Val : true
Received value = false for Switch - Power
Received value = true for Switch - Power
Toggle State to false.
[ 29937][I][RMakerDevice.cpp:162] updateAndReportParam(): Device : Switch, Param Name : Power, Val : false
[ 22532][I][RMakerDevice.cpp:162] updateAndReportParam(): Device : Dimmer, Param Name : Power, Val : true
Received value = 73 for Dimmer - Level
```

### Resetting the device
- Press and Hold the Boot button for more than 3 seconds and then release to reset Wi-Fi configuration.
- Press and Hold the Boot button for more than 10 seconds and then release to reset to factory defaults.
4 changes: 4 additions & 0 deletions libraries/RainMaker/examples/RMakerSwitch/README.md
Original file line number Diff line number Diff line change
@@ -25,3 +25,7 @@ Received value = true for Switch - Power
Toggle State to false.
[ 29937][I][RMakerDevice.cpp:162] updateAndReportParam(): Device : Switch, Param Name : Power, Val : false
```

### Resetting the device
- Press and Hold the Boot button for more than 3 seconds and then release to reset Wi-Fi configuration.
- Press and Hold the Boot button for more than 10 seconds and then release to reset to factory defaults.