Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf41a01e

Browse files
committed
Use gpio calls for OnOff Light example
1 parent3198de3 commitf41a01e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

‎libraries/Zigbee/examples/Zigbee_On_Off_Light/Zigbee_On_Off_Light.ino‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,14 @@ ZigbeeLight zbLight = ZigbeeLight(ZIGBEE_LIGHT_ENDPOINT);
4141

4242
/********************* RGB LED functions **************************/
4343
voidsetLED(bool value) {
44-
rgbLedWrite(LED_PIN,255 * value,255 * value,255 * value);
44+
digitalWrite(LED_PIN, value);
4545
}
4646

4747
/********************* Arduino functions **************************/
4848
voidsetup() {
49-
// Init RMT and leave light OFF
50-
rgbLedWrite(LED_PIN,0,0,0);
49+
// Init LED and turn it OFF (if LED_PIN == RGB_BUILTIN, the RMT will be used under the hood)
50+
pinMode(LED_PIN, OUTPUT);
51+
digitalWrite(LED_PIN, LOW);
5152

5253
// Init button for factory reset
5354
pinMode(BUTTON_PIN, INPUT);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp