Viking Skull Lamp  V1.0.1
Loading...
Searching...
No Matches
lightControl.hpp
Go to the documentation of this file.
1/*
2 * Created on May 28 2022
3 *
4 * Copyright (c) 2022 - Daniel Hajnal
5 * hajnal.daniel96@gmail.com
6 * This file is part of the Viking Skull Lamp project.
7 * Modified 2022.06.27
8*/
9
10/*
11MIT License
12Copyright (c) 2022 Daniel Hajnal
13Permission is hereby granted, free of charge, to any person obtaining a copy
14of this software and associated documentation files (the "Software"), to deal
15in the Software without restriction, including without limitation the rights
16to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17copies of the Software, and to permit persons to whom the Software is
18furnished to do so, subject to the following conditions:
19The above copyright notice and this permission notice shall be included in all
20copies or substantial portions of the Software.
21THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27SOFTWARE.
28*/
29
30#ifndef LIGHT_CONTROL_HPP__
31#define LIGHT_CONTROL_HPP__
32
33#include "Arduino.h"
34#include "FastLED.h"
35#include "menu.hpp"
36#include "musicVisualizer.hpp"
37#include "fogMachine.hpp"
38#include "buzzerControl.hpp"
39#include "motorControl.hpp"
40
43#define LIGHT_STRIP_PIN 12
44
47#define LIGHT_SKULL_PIN 11
48
50#define LIGHT_STRIP_SIZE 27
52#define LIGHT_SKULL_SIZE 7
53
56#define LIGHT_UPDATE_RATE 20
57
60#define LIGHT_FADE_RATE 2
61
64#define SAMPLE_UPDATE_RATE 30
65
67void lightInit();
68
75void lightUpdate();
76
81void lightOn();
82
87void lightOff();
88
93void lightToggle();
94
105
116
127
136
145
154
155
156#endif
void lightModeMusicUpdate()
Update function for the music mode.
void lightInit()
Initialize the LEDs.
void lightUpdate()
Update function for the lighting.
void lightOn()
Turn on the lighting.
void lightModeKomodoUpdate()
Update function for the komodo mode.
void lightToggle()
Toggle the lighting.
void lightModeCandleUpdate()
Update function for the candle mode.
void lightModePulseUpdate()
Update function for the pulse mode.
void lightModeColorUpdate()
Update function for the color mode.
void lightOff()
Turn off the lighting.
void lightModeRainbowUpdate()
Update function for the rainbow mode.