Viking Skull Lamp
V1.0.1
|
Go to the source code of this file.
Macros | |
#define | MOTOR 5 |
The motor is connected to pin 5 on the Arduino. More... | |
#define | MOTOR_PWM 240 |
The motor power can be set with this definition. More... | |
#define | FRONT_ENDSTOP 7 |
The front endstop is connected to pin 7 on the Arduino. More... | |
#define | BACK_ENDSTOP 8 |
The back endstop is connected to pin 7 on the Arduino. More... | |
#define | OPEN_TIMEOUT 2000 |
Maximum allowed time in ms, to open the front. More... | |
#define | CLOSE_TIMEOUT 2000 |
Maximum allowed time in ms, to close the front. More... | |
Enumerations | |
enum | frontState_t { FRONT_UNKNOWN , FRONT_OPEN , FRONT_CLOSE } |
States of the front panel. More... | |
Functions | |
void | motorInit () |
Initialize the motor. More... | |
void | openFront () |
Open the font. More... | |
void | closeFront () |
Close the font. More... | |
Variables | |
enum frontState_t | frontState |
Store the state of the front panel. More... | |
#define BACK_ENDSTOP 8 |
The back endstop is connected to pin 7 on the Arduino.
Definition at line 47 of file motorControl.hpp.
#define CLOSE_TIMEOUT 2000 |
Maximum allowed time in ms, to close the front.
Definition at line 53 of file motorControl.hpp.
#define FRONT_ENDSTOP 7 |
The front endstop is connected to pin 7 on the Arduino.
Definition at line 44 of file motorControl.hpp.
#define MOTOR 5 |
The motor is connected to pin 5 on the Arduino.
Definition at line 37 of file motorControl.hpp.
#define MOTOR_PWM 240 |
The motor power can be set with this definition.
It's range is 0 - 255. 0 means no power 255 is max power.
Definition at line 41 of file motorControl.hpp.
#define OPEN_TIMEOUT 2000 |
Maximum allowed time in ms, to open the front.
Definition at line 50 of file motorControl.hpp.
enum frontState_t |
States of the front panel.
Enumerator | |
---|---|
FRONT_UNKNOWN | Front state is unknown( for example at startup ). |
FRONT_OPEN | Front is opened. |
FRONT_CLOSE | Front is closed. |
Definition at line 56 of file motorControl.hpp.
void closeFront | ( | ) |
Close the font.
It will try to close the front panel.
Definition at line 116 of file motorControl.cpp.
void motorInit | ( | ) |
Initialize the motor.
Definition at line 35 of file motorControl.cpp.
void openFront | ( | ) |
Open the font.
It will try to open the front panel.
Definition at line 73 of file motorControl.cpp.
|
extern |
Store the state of the front panel.
Definition at line 33 of file motorControl.cpp.