ArtCC
March 11, 2020, 10:29am
1
Hi!
I have a RGB led that I want to control from an app using a Firebase cloud feature. I already turn on and off the status led of the ESP8266 board but I can’t find information to connect this RGB led with 4 pins (R, G, B and GND) with javascript as language in Mongoose OS.
Any idea?
Thanks!
Regards, Arturo.
nliviu
March 11, 2020, 10:57am
2
The pwm library supports RGB LEDs.
/*
* Copyright (c) 2014-2018 Cesanta Software Limited
* All rights reserved
*
* Licensed under the Apache License, Version 2.0 (the ""License"");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an ""AS IS"" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* PWM-controlled RGB LED.
* Example:
This file has been truncated. show original
The mgos_pwm_rgb_led_*
API is C only, but mJS can be easily implemented.