Viking Skull Lamp  V1.0.1
Loading...
Searching...
No Matches
main.hpp File Reference
#include "Arduino.h"
#include "globalResources.hpp"
#include "oled.hpp"
#include "menu.hpp"
#include "motorControl.hpp"
#include "lightControl.hpp"
#include "buzzerControl.hpp"
#include "configuration.hpp"
#include "fogMachine.hpp"
#include <avr/wdt.h>

Go to the source code of this file.

Macros

#define ENCODER_BTN   2
 The encoder button is connected to pin 2 on the Arduino. More...
 
#define ENCODER_DATA   4
 The encoder data line is connected to pin 4 on the Arduino. More...
 
#define ENCODER_CLK   3
 The encoder clock line is connected to pin 3 on the Arduino. More...
 
#define BUZZER   9
 
#define DEFAULT_LIGHT_MODE   LIGHT_MODE_RAINBOW
 Default value for the light mode. More...
 
#define DEFAULT_SELECTED_COLOR   0
 Default value for the user selected color. More...
 
#define DEFAULT_LIGHT_BRIGHTNESS   30
 Default value for the brightness. More...
 
#define DEFAULT_BUZZER_STATE   true
 By default the buzzer is enabled. More...
 
#define DEFAULT_CLAP_SWITCH_STATE   true
 By default the clap switch is enabled. More...
 
#define DEFAULT_FOG_STATE   true
 By default the fog machine is enabled. More...
 

Functions

void encoderISR ()
 Interrupt service for the encoder rotation events. More...
 
void encoderButtonUpdate ()
 This function handles the button press detection. More...
 

Macro Definition Documentation

◆ BUZZER

#define BUZZER   9

Definition at line 54 of file main.hpp.

◆ DEFAULT_BUZZER_STATE

#define DEFAULT_BUZZER_STATE   true

By default the buzzer is enabled.

Definition at line 76 of file main.hpp.

◆ DEFAULT_CLAP_SWITCH_STATE

#define DEFAULT_CLAP_SWITCH_STATE   true

By default the clap switch is enabled.

Definition at line 79 of file main.hpp.

◆ DEFAULT_FOG_STATE

#define DEFAULT_FOG_STATE   true

By default the fog machine is enabled.

Definition at line 82 of file main.hpp.

◆ DEFAULT_LIGHT_BRIGHTNESS

#define DEFAULT_LIGHT_BRIGHTNESS   30

Default value for the brightness.

Definition at line 73 of file main.hpp.

◆ DEFAULT_LIGHT_MODE

#define DEFAULT_LIGHT_MODE   LIGHT_MODE_RAINBOW

Default value for the light mode.

Definition at line 67 of file main.hpp.

◆ DEFAULT_SELECTED_COLOR

#define DEFAULT_SELECTED_COLOR   0

Default value for the user selected color.

Definition at line 70 of file main.hpp.

◆ ENCODER_BTN

#define ENCODER_BTN   2

The encoder button is connected to pin 2 on the Arduino.

Definition at line 45 of file main.hpp.

◆ ENCODER_CLK

#define ENCODER_CLK   3

The encoder clock line is connected to pin 3 on the Arduino.

Definition at line 51 of file main.hpp.

◆ ENCODER_DATA

#define ENCODER_DATA   4

The encoder data line is connected to pin 4 on the Arduino.

Definition at line 48 of file main.hpp.

Function Documentation

◆ encoderButtonUpdate()

void encoderButtonUpdate ( )

This function handles the button press detection.

Definition at line 190 of file main.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ encoderISR()

void encoderISR ( )

Interrupt service for the encoder rotation events.

Definition at line 160 of file main.cpp.

Here is the call graph for this function:
Here is the caller graph for this function: