diff --git a/AiLight_Rainbow.ino b/AiLight_Rainbow.ino deleted file mode 100644 index 52a9c01..0000000 --- a/AiLight_Rainbow.ino +++ /dev/null @@ -1,58 +0,0 @@ -/* - A simple example making the AiLight showing a rainbow effect using the - AiLight library. - - This file is part of the AiLight library. - Copyright (c) 2017 Sacha Telgenhof (). All - rights reserved. - - For the full copyright and license information, please view the LICENSE - file that was distributed with this source code. - */ - -#include "AiLight.hpp" - -#define RAINBOW_DELAY 10 // Time to wait for next colour (in milliseconds) - -/** - * @brief Show a rainbow effect - * - * Thanks to Xose Pérez for the rainbow effect code - * (https://github.com/xoseperez/my9291) - * - * @param index an index to determine the colour to be displayed - * - * @return void - */ -void rainbowEffect(uint8_t index) { - if (index < 85) { - AiLight.setColor(index * 3, 255 - index * 3, 0); - } else if (index < 170) { - index -= 85; - AiLight.setColor(255 - index * 3, 0, index * 3); - } else { - index -= 170; - AiLight.setColor(0, index * 3, 255 - index * 3); - } -} - -/** - * @brief Bootstrap/Initialisation - */ -void setup() { - AiLight.setState(true); // Switch on the light -} - -/** - * @brief Main loop - */ -void loop() { - static unsigned long previousMillis = millis(); - - // Show the rainbow... - if (millis() - previousMillis > RAINBOW_DELAY) { - static uint8_t count = 0; - previousMillis = millis(); - rainbowEffect(count++); - } -} diff --git a/README.md b/README.md index 84983e7..e9aea6a 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ This can all be done with the built-in (mobile friendly) Web UI or in [Home Assi - ~~MQTT Last Will And Testament~~ - ~~Gamma Correction~~ -Making this firmware was largely inspired by the [MY9291](https://github.com/xoseperez/my9291) LED driver and the [Espurna](https://bitbucket.org/xoseperez/espurna) firmware of [Xose Pérez](https://github.com/xoseperez). +Making this firmware was largely inspired by the [MY9291](https://github.com/xoseperez/my9291) LED driver and the [Espurna](https://github.com/xoseperez/espurna) firmware of [Xose Pérez](https://github.com/xoseperez). ## Getting started Got curious and want to use **AiLight** too? Head over to the [Wiki](https://github.com/stelgenhof/AiLight/wiki) where you can find all relevant topics on how to [connect](https://github.com/stelgenhof/AiLight/wiki/Connection), [flash](https://github.com/stelgenhof/AiLight/wiki/Flashing-the-Firmware) and use the **AiLight** firmware!