Skip to content

Commit 2f30a49

Browse files
committed
updated README
1 parent 1b7e793 commit 2f30a49

File tree

1 file changed

+6
-15
lines changed

1 file changed

+6
-15
lines changed

README.md

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
### VS Code & PlatformIO:
1515
1. Install [VS Code](https://code.visualstudio.com/)
1616
2. Install [PlatformIO](https://platformio.org/platformio-ide)
17-
3. Install **SinricPro** library by using [Library Manager](https://docs.platformio.org/en/latest/librarymanager/)
18-
4. Use included [platformio.ini](examples/platformio/platformio.ini) file from examples to ensure that all dependent libraries will installed automaticly.
17+
3. Create a new Project
18+
4. Use the [Library Manager](https://docs.platformio.org/en/latest/librarymanager/) to add the library to your project or add `sinricpro/SinricPro` manually to your `lib_deps` in `platformio.ini`.
1919

2020
![sinricpro library manager](https://raw.githubusercontent.com/sinricpro/images/master/platformio-install-sinricpro.png)
2121

@@ -30,8 +30,8 @@
3030
---
3131

3232
## Dependencies
33-
[ArduinoJson](https://github.com/bblanchon/ArduinoJson) by Benoit Blanchon (minimum Version 7.0.3)
34-
[WebSockets](https://github.com/Links2004/arduinoWebSockets) by Markus Sattler (minimum Version 2.4.0)
33+
- [ArduinoJson](https://github.com/bblanchon/ArduinoJson) by Benoit Blanchon (minimum Version 7.0.3)
34+
- [WebSockets](https://github.com/Links2004/arduinoWebSockets) by Markus Sattler (minimum Version 2.4.0)
3535

3636
---
3737

@@ -93,28 +93,19 @@ Example
9393
```C++
9494
SinricProSwitch& mySwitch = SinricPro["YOUR-SWITCH-ID-HERE"];
9595
```
96-
*Example 2 (alternatively)*
97-
```C++
98-
SinricProSwitch& mySwitch = SinricPro.add<SinricProSwitch>("YOUR-SWITCH-ID-HERE");
99-
```
10096

10197
---
10298
## How to retrieve a device for sending an event?
10399
Syntax is
104100
```C++
105101
DeviceType& myDevice = SinricPro[DEVICE_ID];
106102
```
107-
Example 1
103+
Example
108104
```C++
109105
SinricProDoorbell& myDoorbell = SinricPro["YOUR-DOORBELL-ID-HERE"];
110106
myDoorbell.sendDoorbellEvent();
111107
```
112108

113-
*Example 2 (alternatively)*
114-
```C++
115-
SinricPro["YOUR-DOORBELL-ID-HERE"].as<SinricProDoorbell>().sendDoorbellEvent();
116-
```
117-
118109
## How to send a push notification?
119110
```C++
120111
SinricProSwitch& mySwitch = SinricPro[SWITCH_ID];
@@ -123,7 +114,7 @@ mySwitch.sendPushNotification("Hello SinricPro!");
123114

124115
---
125116

126-
# Devices
117+
## Devices
127118
* Switch
128119
* Dimmable Switch
129120
* Light

0 commit comments

Comments
 (0)