ESP_IOT v2.5
IOT ESP Coding
PTStepperClass.cpp File Reference
#include "PTStepperClass.h"
#include "StepperModule.h"
Include dependency graph for PTStepperClass.cpp:

Go to the source code of this file.

Macros

#define NEW_M5_STEPPER
 
#define IN1   22
 
#define IN2   19
 
#define IN3   23
 
#define IN4   33
 
#define USE_STEPPER_ANGLE_FORMULA
 

Functions

int _ourSteps_PTStepperClass (0)
 PTStepperClass More...
 
void step_PTStepperClass (int steps[][4], int stepCount)
 
void clearPins_PTStepperClass ()
 
void whoAreWe_PTStepperClass ()
 calculate the steps etc More...
 
void cycle_PTStepperClass ()
 cycle More...
 

Variables

int _targetSteps_PTStepperClass
 
int _lastType_PTStepperClass = 0
 
int _fudgeFactor_PTStepperClass = 0
 
int _pins_PTStepperClass []
 
int _fullStepCount_PTStepperClass = 4
 
int _fullSteps_PTStepperClass [][4]
 
int _currentStep_PTStepperClass = 0
 
int _cycleCounter_PTStepperClass = 0
 
bool _clockwise_PTStepperClass = true
 

Macro Definition Documentation

◆ IN1

#define IN1   22

Definition at line 44 of file PTStepperClass.cpp.

◆ IN2

#define IN2   19

Definition at line 45 of file PTStepperClass.cpp.

◆ IN3

#define IN3   23

Definition at line 46 of file PTStepperClass.cpp.

◆ IN4

#define IN4   33

Definition at line 47 of file PTStepperClass.cpp.

◆ NEW_M5_STEPPER

#define NEW_M5_STEPPER

Definition at line 41 of file PTStepperClass.cpp.

◆ USE_STEPPER_ANGLE_FORMULA

#define USE_STEPPER_ANGLE_FORMULA

Function Documentation

◆ _ourSteps_PTStepperClass()

int _ourSteps_PTStepperClass ( )

PTStepperClass

for now .. use the PTStepper.h

Here is the caller graph for this function:

◆ clearPins_PTStepperClass()

void clearPins_PTStepperClass ( )

Definition at line 96 of file PTStepperClass.cpp.

Here is the caller graph for this function:

◆ cycle_PTStepperClass()

void cycle_PTStepperClass ( )

cycle

Definition at line 201 of file PTStepperClass.cpp.

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

◆ step_PTStepperClass()

void step_PTStepperClass ( int  steps[][4],
int  stepCount 
)

Definition at line 181 of file PTStepperClass.cpp.

Here is the caller graph for this function:

◆ whoAreWe_PTStepperClass()

void whoAreWe_PTStepperClass ( )

calculate the steps etc

converts degrees to motor cycles

6.14.2024 put this back as the if-else was goofed up.

see if the motor direction is clockwise == true

Definition at line 105 of file PTStepperClass.cpp.

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

Variable Documentation

◆ _clockwise_PTStepperClass

bool _clockwise_PTStepperClass = true

Definition at line 87 of file PTStepperClass.cpp.

◆ _currentStep_PTStepperClass

int _currentStep_PTStepperClass = 0

Definition at line 79 of file PTStepperClass.cpp.

◆ _cycleCounter_PTStepperClass

int _cycleCounter_PTStepperClass = 0

Definition at line 81 of file PTStepperClass.cpp.

◆ _fudgeFactor_PTStepperClass

int _fudgeFactor_PTStepperClass = 0

Definition at line 20 of file PTStepperClass.cpp.

◆ _fullStepCount_PTStepperClass

int _fullStepCount_PTStepperClass = 4

Definition at line 69 of file PTStepperClass.cpp.

◆ _fullSteps_PTStepperClass

int _fullSteps_PTStepperClass[][4]
Initial value:
= {
{HIGH,HIGH,LOW,LOW},
{LOW,HIGH,HIGH,LOW},
{LOW,LOW,HIGH,HIGH},
{HIGH,LOW,LOW,HIGH}
}

Definition at line 70 of file PTStepperClass.cpp.

◆ _lastType_PTStepperClass

int _lastType_PTStepperClass = 0

Definition at line 19 of file PTStepperClass.cpp.

◆ _pins_PTStepperClass

int _pins_PTStepperClass[]
Initial value:
{
IN1,
IN2,
IN3,
IN4
}
#define IN4
#define IN1
#define IN2
#define IN3

Definition at line 49 of file PTStepperClass.cpp.

◆ _targetSteps_PTStepperClass

int _targetSteps_PTStepperClass

Definition at line 18 of file PTStepperClass.cpp.