|
ESP_IOT v2.5
IOT ESP Coding
|
#include "StepperModule.h"#include "PTStepperClass.h"#include "DCMotorStepperClass.h"#include "MotorStepperClassType.h"#include "HDriverStepperClass.h"#include "SG90ServoStepperClass.h"#include "L9110S_DCStepperClass.h"#include "ULN2003_StepperClass.h"
Go to the source code of this file.
Macros | |
| #define | NUM_STEPPER_CLASS 6 |
| MAKE SURE THIS IS UPDATED... More... | |
| #define | FEED_STOPPED 0 |
| #define | SINGLE_FEED 1 |
| #define | AUTO_FEED 2 |
| #define | JACKPOT_FEED 3 |
| #define | FEED_INTERVAL 1000 |
| #define | SETUP_FIRST_TIME |
Functions | |
| void | setup_StepperClasses () |
| void | stepperModule_savePreference (int preferenceID, String preferenceValue) |
| called to set a preference (which will be an identifier and a string, which can be converted to a number or boolean) More... | |
| boolean | getBuzzStatus_StepperModule () |
| returns the buzzer status More... | |
| int | getFeederType () |
| retreives the feeder type (versus grabbing a global variable) More... | |
| void | setup_StepperModule () |
| called on setup() More... | |
| char * | stepperIdentity_StepperModule () |
| void | stepperModule_ProcessClientCmdFinal (char cmd) |
| the Blink the LED - and it will use the latest BUZZER status (so MQTT could set buzzer on.. then call this) More... | |
| void | loop_StepperModule () |
| the main loop fro the StepperModule. This used be called FeederStateMachine() More... | |
Variables | |
| DCMotorStepperClass * | _DCMotorStepperClass |
| 3.16.25 using a class version (thisi is for ESP_32 and ESP_M5 now) More... | |
| PTStepperClass * | _PTStepperClass |
| 2 More... | |
| HDriverStepperClass * | _HDriverStepperClass |
| 3 More... | |
| SG90ServoStepperClass * | _SG90ServoStepperClass |
| L9110S_DCStepperClass * | _L9110S_DCStepperClass |
| ULN2003_StepperClass * | _ULN2003_StepperClass |
| MotorStepperClassType * | _whichMotorStepper |
| use this one... More... | |
| MotorStepperClassType * | _motorSteppers [NUM_STEPPER_CLASS] |
| 3.31.25 create array of plugs More... | |
| int | _feedState = FEED_STOPPED |
| int | _feedsPerJackpot = 3 |
| int | _feedCount = _feedsPerJackpot |
| unsigned long | feedPreviousMillis = 0 |
| #define AUTO_FEED 2 |
Definition at line 93 of file StepperModule.cpp.
| #define FEED_INTERVAL 1000 |
Definition at line 100 of file StepperModule.cpp.
| #define FEED_STOPPED 0 |
Definition at line 91 of file StepperModule.cpp.
| #define JACKPOT_FEED 3 |
Definition at line 94 of file StepperModule.cpp.
| #define NUM_STEPPER_CLASS 6 |
MAKE SURE THIS IS UPDATED...
Definition at line 42 of file StepperModule.cpp.
| #define SETUP_FIRST_TIME |
| #define SINGLE_FEED 1 |
Definition at line 92 of file StepperModule.cpp.
| boolean getBuzzStatus_StepperModule | ( | ) |
returns the buzzer status
retrieves the buzzer status
Definition at line 107 of file StepperModule.cpp.

| int getFeederType | ( | ) |
retreives the feeder type (versus grabbing a global variable)
retreives the feeder type, UNO or MINI
Definition at line 114 of file StepperModule.cpp.

| void loop_StepperModule | ( | ) |
the main loop fro the StepperModule. This used be called FeederStateMachine()
the main loop for the StepperModule (this is the FeederStateMachine)
3.24.25 warm rain all day.. no ski call the loop (which might have a timer to stop a motor)
5.3.24 Issue #332 if TUMBLER .. reverse direction
8.2.24 have the auto a mode as well.. for older Tumblers. Default is ON (so we can change the old ones), message: {"set":"autoMotorDirection","val":"true"}
note: reboot not needed as the next time a feed happens, it reads this value
Definition at line 242 of file StepperModule.cpp.


| void setup_StepperClasses | ( | ) |
instances of the PTStepeprClass NOTE: These are the "identity' so that is also the "message" sent around. So SELF defining. 3.31.25 try Servo .. 5.18.25 45 years Mt St Hellens Eruption 8.13.25 Trying Stepper motor with HDriver (other was rather loud and grating) just check if we haven't goofed with NUM_STEPPER_CLASS not being the actual number whichStepperClasssIndex TODO: create an array of plug options .. then call their "identity" method
Definition at line 50 of file StepperModule.cpp.

| void setup_StepperModule | ( | ) |
called on setup()
3.28.24 feed on startup..
3.16.25 use the class ..
NOTE: this is only re-evaluated on reboot .. for now 3.16.25 for now this is compile option .. but no reason the same build cannot support it.. sensor kind (see the M5AtomSensor .. as example)
find it dynamically 3.31.25
if nothing found .. use default
the motorStepper can be nil
5.2.25 default to HDriver..
7.31.25 use default..
Definition at line 120 of file StepperModule.cpp.


| char * stepperIdentity_StepperModule | ( | ) |
4.1.25 April Fools day. Mt Peak hike (162 bmp strange spike) get the identity of the SenasorPlug nil if non
Definition at line 184 of file StepperModule.cpp.

| void stepperModule_ProcessClientCmdFinal | ( | char | cmd | ) |
the Blink the LED - and it will use the latest BUZZER status (so MQTT could set buzzer on.. then call this)
SerialDebug.println("Valid Commands: "); SerialDebug.println(" H == help, this message"); SerialDebug.println(" 0x0, s, c == Single Feed "); SerialDebug.println(" a == AutoFeed "); SerialDebug.println(" u == UNO "); SerialDebug.println(" m == MINI "); SerialDebug.println(" L == Tumbler "); SerialDebug.println(" B == Buzzer On"); SerialDebug.println(" b == Buzzer Off"); SerialDebug.println(" G == Gateway On"); SerialDebug.println(" g == gateway Off"); SerialDebug.println(" R == clean credentials"); SerialDebug.println(" O == OTA update"); SerialDebug.println(" X == clean EPROM"); SerialDebug.println(" T == tilt on"); SerialDebug.println(" t == tilt off"); processes a single character command from BLE (or from MQTT converted to a single character)
NOTE: There are other commands, but these are only the ones that require a action. TODO: make these "events" on the setting of those values. eg. register for stepperValue true or false, etc.. They would be invoked from the 'savePreferencesBoolean' call.
Definition at line 195 of file StepperModule.cpp.


| void stepperModule_savePreference | ( | int | preferenceID, |
| String | preferenceValue | ||
| ) |
called to set a preference (which will be an identifier and a string, which can be converted to a number or boolean)
| DCMotorStepperClass* _DCMotorStepperClass |
3.16.25 using a class version (thisi is for ESP_32 and ESP_M5 now)
Definition at line 26 of file StepperModule.cpp.
| int _feedCount = _feedsPerJackpot |
Definition at line 98 of file StepperModule.cpp.
| int _feedsPerJackpot = 3 |
Definition at line 97 of file StepperModule.cpp.
| int _feedState = FEED_STOPPED |
Definition at line 96 of file StepperModule.cpp.
| HDriverStepperClass* _HDriverStepperClass |
3
Definition at line 30 of file StepperModule.cpp.
| L9110S_DCStepperClass* _L9110S_DCStepperClass |
5 5.18.25 45 years Mt St Hellens Eruption
Definition at line 36 of file StepperModule.cpp.
| MotorStepperClassType* _motorSteppers[NUM_STEPPER_CLASS] |
3.31.25 create array of plugs
Definition at line 48 of file StepperModule.cpp.
| PTStepperClass* _PTStepperClass |
2
Definition at line 28 of file StepperModule.cpp.
| SG90ServoStepperClass* _SG90ServoStepperClass |
4 3.31.25 try Servo ..
Definition at line 33 of file StepperModule.cpp.
| ULN2003_StepperClass* _ULN2003_StepperClass |
6 8.13.25 Trying Stepper motor with HDriver (other was rather loud and grating)
Definition at line 39 of file StepperModule.cpp.
| MotorStepperClassType* _whichMotorStepper |
use this one...
Definition at line 45 of file StepperModule.cpp.
| unsigned long feedPreviousMillis = 0 |
Definition at line 101 of file StepperModule.cpp.