Go to the documentation of this file.
87 #ifdef ARDUINO_AVR_USTEPPER_S
88 #include "uStepperS.h"
91 #ifdef ARDUINO_AVR_USTEPPER_S_LITE
92 #include "uStepperSLite.h"
96 #include <avr/pgmspace.h>
105 #define DRAWPAGE(x) do\
107 if(this->screen->busFailure)\
110 this->lastPage = NOPAGE;\
111 this->screen->init();\
120 while(this->screen->busFailure);\
165 #define RESETWDT asm volatile("WDR \n\t")
216 int8_t stallsens = 2,
225 #ifdef ARDUINO_AVR_USTEPPER_S
229 #ifdef ARDUINO_AVR_USTEPPER_S_LITE
230 uStepperSLite stepper;
291 volatile buttons forwardBtn = {0x1F, DEPRESSED, 0, 0, 0},
292 playBtn = {0x1F, DEPRESSED, 0, 0, 0},
293 recordBtn = {0x1F, DEPRESSED, 0, 0, 0},
294 backwardsBtn = {0x1F, DEPRESSED, 0, 0, 0};
298 unsigned char* loadVideoBuffer(
unsigned char *data,
unsigned char length);
373 void recordPage(
bool pidMode,
bool recorded, uint8_t index,
float pos);
401 void timePage(uint8_t step,
bool pidMode);
414 void debounce(
buttons *btn, uint8_t sample);
void changeVelocity(void)
Holds the code for the changing velocity during sequence play.
egoShield(void)
Constructor of egoShield class.
void recordPage(bool pidMode, bool recorded, uint8_t index, float pos)
Holds the code for the record page of the OLED.
void playPage(bool loopMode, bool pidMode, uint8_t index, bool mode)
Holds the code for the play page of the OLED.
class definitions for the screen handling
void timePage(uint8_t step, bool pidMode)
Holds the code for the timelapse page of the OLED.
Screen * screen
Contains the main logic of the shield functionality, e.g. transition between states (idle,...
uint8_t buttonState(uint8_t button, uint8_t nmbr)
Returns the button state of the appropriate button.
void recordMode(void)
This function handles the debouncing and tracking of whether buttons are pressed, released or held.
void idlePage(bool pidMode, float pos)
Holds the code for the idle page of the OLED.
void resetAllButton()
Resets the state of all 4 buttons at once.
void setup(uint16_t acc=1500, uint16_t vel=100, float P=1.0, float I=0.02, float D=0.006, float res=1, int8_t stallsens=2, uint16_t shutterDelay=250)
Initializes buttons, OLED, uStepper and BT-module.
void manBackward(void)
Holds the manual backward logic for driving the stepper motor manually with the pushbuttons.
friend void TIMER4_COMPA_vect(void) __attribute__((signal
Watchdog timer interrupt handler, for examining the buttons periodically.
void playMode(void)
Holds the play logic, showing play page and running the recorded sequence.
void TIMER4_COMPA_vect(void) __attribute__((signal
Watchdog timer interrupt handler, for examining the buttons periodically.
void manForward(void)
Holds the manual forward logic for driving the stepper motor manually with the pushbuttons.
void timeMode(void)
Holds the timelapse logic, showing the timelapse page.
void startPage(void)
Holds the code for the start page of the OLED.
void idleMode(void)
Holds the idle logic; page to show, what buttons to enable etc.
void inputs(void)
Reads the four buttons and writes their value; no push, short push or long push, to global variables.
void pauseMode(void)
Holds the pause logic, showing the pause page and pausing the playing of a sequence.
void resetButton(buttons *btn)
Function for resetting the state of a button seperately.
void pausePage(bool loopMode, bool pidMode, uint8_t index)
Holds the code for the pause page of the OLED.