Viking Skull Lamp
V1.0.1
Loading...
Searching...
No Matches
main.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
/*
11
MIT License
12
Copyright (c) 2022 Daniel Hajnal
13
Permission is hereby granted, free of charge, to any person obtaining a copy
14
of this software and associated documentation files (the "Software"), to deal
15
in the Software without restriction, including without limitation the rights
16
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17
copies of the Software, and to permit persons to whom the Software is
18
furnished to do so, subject to the following conditions:
19
The above copyright notice and this permission notice shall be included in all
20
copies or substantial portions of the Software.
21
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27
SOFTWARE.
28
*/
29
30
#ifndef MAIN_HPP__
31
#define MAIN_HPP__
32
33
#include "Arduino.h"
34
#include "
globalResources.hpp
"
35
#include "
oled.hpp
"
36
#include "
menu.hpp
"
37
#include "
motorControl.hpp
"
38
#include "
lightControl.hpp
"
39
#include "
buzzerControl.hpp
"
40
#include "
configuration.hpp
"
41
#include "
fogMachine.hpp
"
42
#include <avr/wdt.h>
43
45
#define ENCODER_BTN 2
46
48
#define ENCODER_DATA 4
49
51
#define ENCODER_CLK 3
52
53
// The buzzer is connected to pin 9 on the Arduino.
54
#define BUZZER 9
55
/*
56
____ ____ ____ ______ _____
57
/ __ \___ / __/___ ___ __/ / /_ / ____/___ ____ / __(_)___ _
58
/ / / / _ \/ /_/ __ `/ / / / / __/ / / / __ \/ __ \/ /_/ / __ `/
59
/ /_/ / __/ __/ /_/ / /_/ / / /_ / /___/ /_/ / / / / __/ / /_/ /
60
/_____/\___/_/ \__,_/\__,_/_/\__/ \____/\____/_/ /_/_/ /_/\__, /
61
/____/
62
63
*/
64
//---- This section contains the default configuration for the first boot up ----//
65
67
#define DEFAULT_LIGHT_MODE LIGHT_MODE_RAINBOW
68
70
#define DEFAULT_SELECTED_COLOR 0
71
73
#define DEFAULT_LIGHT_BRIGHTNESS 30
74
76
#define DEFAULT_BUZZER_STATE true
77
79
#define DEFAULT_CLAP_SWITCH_STATE true
80
82
#define DEFAULT_FOG_STATE true
83
85
void
encoderISR
();
86
88
void
encoderButtonUpdate
();
89
90
#endif
buzzerControl.hpp
configuration.hpp
fogMachine.hpp
globalResources.hpp
lightControl.hpp
encoderButtonUpdate
void encoderButtonUpdate()
This function handles the button press detection.
Definition:
main.cpp:190
encoderISR
void encoderISR()
Interrupt service for the encoder rotation events.
Definition:
main.cpp:160
menu.hpp
motorControl.hpp
oled.hpp
Software
include
main.hpp
|
|
|
© 2021-2022 Daniel Hajnal
|
Viking Skull Lamp V1.0.1
| Generated by:
on Sun Oct 16 2022
|
|
|
© 2021-2022 Daniel Hajnal
|
Viking Skull Lamp V1.0.1
| Generated by:
on Sun Oct 16 2022