Skip to content

Commit ca43c5e

Browse files
authored
Merge pull request #62 from SmartThingsCommunity/master_rel_1_4_4
Master rel 1 4 4
2 parents 4367a89 + 22dee4a commit ca43c5e

15 files changed

+142
-46
lines changed

apps/esp32/light_example/README.md

100755100644
Lines changed: 32 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SmartThings Device SDK Switch Example
1+
# SmartThings SDK for Direct Connected Devices for C - Light Example
22

33
## Introduction
44

@@ -15,23 +15,42 @@ Components and Capabilities are contained in device profile. You can create a de
1515

1616
This example assumes the following components and capabilities are used. :
1717

18-
'main' component
19-
- 'healthCheck' capability
20-
- 'switch' capability
21-
- 'switchLevel' capability
22-
- 'colorTemperature' capability
23-
- 'activityLightingMode' capability
18+
`main` component
19+
- `healthCheck` capability
20+
- `switch` capability
21+
- `switchLevel` capability
22+
- `colorTemperature` capability
23+
- `activityLightingMode` capability
2424

25-
'monitor' component
26-
- 'dustSensor' capability
25+
`monitor` component
26+
- `dustSensor` capability
2727

28-
('healthCheck' capability is automatically added by Developer Workspace. It doesn't need handler at device side)
28+
(`healthCheck` capability is automatically added by Developer Workspace. It doesn't need handler at device side)
2929

30-
## SmartThings Device SDK config
30+
## SmartThings SDK for Direct Connected Devices - Config
3131
If you want to use specific SmartThings Device SDK build options, you can directly modify the build configuration file. For this example, SmartThings Device SDK config is saved in 'sdkconfig' file. If you want to change this, please execute the following :
3232
```sh
33-
# ./build.sh {app_path} {option}
33+
# python build.py {app_path} {option}
3434
$ cd ~/st-device-sdk-c-ref/
35-
$ ./build.sh app/esp32/light_example menuconfig
35+
$ python build.py app/esp32/light_example menuconfig
3636
```
3737

38+
## Test device schematics
39+
This example uses ESP32 GPIO like below.
40+
Please refer below picture for __ESP32-DevKitC__.
41+
> Note: If your device's schematics doesn't match with belows.
42+
> Please modify GPIO defines for your device at [device_control.h](main/device_control.h)
43+
> ```c
44+
> #define GPIO_INPUT_BUTTON 0
45+
>
46+
> #define GPIO_OUTPUT_COLORLED_R 12
47+
> #define GPIO_OUTPUT_COLORLED_G 14
48+
> #define GPIO_OUTPUT_COLORLED_B 27
49+
> #define GPIO_OUTPUT_COLORLED_0 26
50+
> ```
51+
52+
### ESP32-DevKitC V4
53+
| ESP32 DevKitC |
54+
|-------------------------------------------------------------------|
55+
|![ESP32_DEVKITC](../../../doc/res/Light_Example_ESP32_DEVKITC.png) |
56+

apps/esp32/switch_example/README.md

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SmartThings Device SDK Switch Example
1+
# SmartThings SDK for Direct Connected Devices for C - Switch Example
22

33
## Introduction
44

@@ -15,17 +15,34 @@ Components and Capabilities are contained in device profile. You can create a de
1515

1616
This example assumes the following component and capabilities are used. :
1717

18-
'main' component
19-
- 'healthCheck' capability
20-
- 'switch' capability
18+
`main` component
19+
- `healthCheck` capability
20+
- `switch` capability
2121

22-
('healthCheck' capability is automatically added by Developer Workspace. It doesn't need handler at device side)
22+
(`healthCheck` capability is automatically added by Developer Workspace. It doesn't need handler at device side)
2323

24-
## SmartThings Device SDK config
24+
## SmartThings SDK for Direct Connected Devices - Config
2525
If you want to use specific SmartThings Device SDK build options, you can directly modify the build configuration file. For this example, SmartThings Device SDK config is saved in 'sdkconfig' file. If you want to change this, please execute the following :
2626
```sh
27-
# ./build.sh {app_path} {option}
27+
# python build.py {app_path} {option}
2828
$ cd ~/st-device-sdk-c-ref/
29-
$ ./build.sh app/esp32/switch_example menuconfig
29+
$ python build.py app/esp32/switch_example menuconfig
3030
```
3131

32+
## Test device schematics
33+
This example uses ESP32 GPIO like below.
34+
Please refer below picture for __ESP32-DevKitC__.
35+
> Note: If your device's schematics doesn't match with belows.
36+
> Please modify GPIO defines for your device at [device_control.h](main/device_control.h)
37+
> ```c
38+
> #define GPIO_INPUT_BUTTON 0
39+
>
40+
> #define GPIO_OUTPUT_MAINLED 12
41+
> #define GPIO_OUTPUT_MAINLED_0 26 /* use as ground */
42+
> ```
43+
44+
### ESP32-DevKitC V4
45+
| ESP32 DevKitC |
46+
|-------------------------------------------------------------------|
47+
|![ESP32_DEVKITC](../../../doc/res/Switch_Example_ESP32_DEVKITC.png) |
48+
Lines changed: 44 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SmartThings Device SDK Switch Example
1+
# SmartThings SDK for Direct Connected Devices for C - Light Example
22

33
## Introduction
44

@@ -15,23 +15,54 @@ Components and Capabilities are contained in device profile. You can create a de
1515

1616
This example assumes the following components and capabilities are used. :
1717

18-
'main' component
19-
- 'healthCheck' capability
20-
- 'switch' capability
21-
- 'switchLevel' capability
22-
- 'colorTemperature' capability
23-
- 'activityLightingMode' capability
18+
`main` component
19+
- `healthCheck` capability
20+
- `switch` capability
21+
- `switchLevel` capability
22+
- `colorTemperature` capability
23+
- `activityLightingMode` capability
2424

25-
'monitor' component
26-
- 'dustSensor' capability
25+
`monitor` component
26+
- `dustSensor` capability
2727

28-
('healthCheck' capability is automatically added by Developer Workspace. It doesn't need handler at device side)
28+
(`healthCheck` capability is automatically added by Developer Workspace. It doesn't need handler at device side)
2929

30-
## SmartThings Device SDK config
30+
## SmartThings SDK for Direct Connected Devices - Config
3131
If you want to use specific SmartThings Device SDK build options, you can directly modify the build configuration file. For this example, SmartThings Device SDK config is saved in 'sdkconfig' file. If you want to change this, please execute the following :
3232
```sh
33-
# ./build.sh {app_path} {option}
33+
# python build.py {app_path} {option}
3434
$ cd ~/st-device-sdk-c-ref/
35-
$ ./build.sh app/esp8266/light_example menuconfig
35+
$ python build.py app/esp8266/light_example menuconfig
3636
```
3737

38+
## Test device schematics
39+
This example uses ESP32 GPIO like below.
40+
Please refer below pictures for __ESP8266-WEMOS D1 mini__ and __ESP8266-DEVKITC__.
41+
GPIOs for __ESP8266-WEMOS D1 mini__ will be used by default. You can switch it for __ESP8266-DEVKITC__ by uncommenting below `define` at [device_control.h](main/device_control.h)
42+
```c
43+
//#define CONFIG_TARGET_ESP8266_DEVKITC_V1
44+
```
45+
46+
> Note: If your device's schematics doesn't match with belows.
47+
> Please modify GPIO defines for your device at [device_control.h](main/device_control.h)
48+
>
49+
> ```c
50+
> #define GPIO_INPUT_BUTTON 5
51+
>
52+
> #define GPIO_OUTPUT_COLORLED_R 16
53+
> #define GPIO_OUTPUT_COLORLED_G 14
54+
> #define GPIO_OUTPUT_COLORLED_B 12
55+
> #define GPIO_OUTPUT_COLORLED_0 13
56+
> ```
57+
58+
### ESP8266-WEMOS D1 mini
59+
| ESP8266 WEMOS D1 mini |
60+
|-------------------------------------------------------------------|
61+
|![ESP8266_WEMOS_D1_MINI](../../../doc/res/Light_Example_ESP8266_D1_mini.png) |
62+
63+
64+
### ESP8266-DEVKITC
65+
| ESP8266 DEVKITC |
66+
|-------------------------------------------------------------------|
67+
|![ESP8266_DEVKITC](../../../doc/res/Light_Example_ESP8266_DEVKITC.png) |
68+

apps/esp8266/switch_example/README.md

Lines changed: 37 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SmartThings Device SDK Switch Example
1+
# SmartThings SDK for Direct Connected Devices for C - Switch Example
22

33
## Introduction
44

@@ -15,17 +15,46 @@ Components and Capabilities are contained in device profile. You can create a de
1515

1616
This example assumes the following component and capabilities are used. :
1717

18-
'main' component
19-
- 'healthCheck' capability
20-
- 'switch' capability
18+
`main` component
19+
- `healthCheck` capability
20+
- `switch` capability
2121

22-
('healthCheck' capability is automatically added by Developer Workspace. It doesn't need handler at device side)
22+
(`healthCheck` capability is automatically added by Developer Workspace. It doesn't need handler at device side)
2323

24-
## SmartThings Device SDK config
24+
## SmartThings SDK for Direct Connected Devices - Config
2525
If you want to use specific SmartThings Device SDK build options, you can directly modify the build configuration file. For this example, SmartThings Device SDK config is saved in 'sdkconfig' file. If you want to change this, please execute the following :
2626
```sh
27-
# ./build.sh {app_path} {option}
27+
# python build.py {app_path} {option}
2828
$ cd ~/st-device-sdk-c-ref/
29-
$ ./build.sh app/esp8266/switch_example menuconfig
29+
$ python build.py app/esp8266/switch_example menuconfig
3030
```
3131

32+
## Test device schematics
33+
This example uses ESP32 GPIO like below.
34+
Please refer below pictures for __ESP8266-WEMOS D1 mini__ and __ESP8266-DEVKITC__.
35+
GPIOs for __ESP8266-WEMOS D1 mini__ will be used by default. You can switch it for __ESP8266-DEVKITC__ by uncommenting below `define` at [device_control.h](main/device_control.h)
36+
```c
37+
//#define CONFIG_TARGET_ESP8266_DEVKITC_V1
38+
```
39+
40+
> Note: If your device's schematics doesn't match with belows.
41+
> Please modify GPIO defines for your device at [device_control.h](main/device_control.h)
42+
>
43+
> ```c
44+
> #define GPIO_INPUT_BUTTON 5
45+
>
46+
> #define GPIO_OUTPUT_MAINLED 16
47+
> #define GPIO_OUTPUT_MAINLED_0 13 /* use as ground */
48+
>```
49+
50+
### ESP8266-WEMOS D1 mini
51+
| ESP8266 WEMOS D1 mini |
52+
|-------------------------------------------------------------------|
53+
|![ESP8266_WEMOS_D1_MINI](../../../doc/res/Switch_Example_ESP8266_D1_mini.png) |
54+
55+
56+
### ESP8266-DEVKITC
57+
| ESP8266 DEVKITC |
58+
|-------------------------------------------------------------------|
59+
|![ESP8266_DEVKITC](../../../doc/res/Switch_Example_ESP8266_DEVKITC.png) |
60+

doc/res/ESP32_DEVKITC.png

-560 KB
Binary file not shown.

doc/res/ESP8266_DEVKITC_V1.png

-627 KB
Binary file not shown.
718 KB
Loading
948 KB
Loading
831 KB
Loading
735 KB
Loading

0 commit comments

Comments
 (0)