ESP_IOT v2.5
IOT ESP Coding
M5Atom_HDriverModuleClass.cpp
Go to the documentation of this file.
1//
2// M5Atom_HDriverModuleClass.cpp
3//
4//
5// Created by Scott Moody on 5/6/25.
6//
7
9
10//! 8.30.25 LA Warm, Zuma Beach - end scene of Planet of Apes
11#ifdef USE_FAST_LED
12#include "../ATOM_LED_Module/M5Display.h"
13#endif
14
15//! Currently the HDriver only processes the BUZZER .. so the setup works..
17{
18 SerialDebug.printf("M5Atom_HDriverModuleClass init %s\n", config);
19
20}
21
22//!6.6.24 D-Day 81 years
23//!return true or false if this should be a PTFeeder or PTClicker
24//!default 'false' to PTClicker. The Bluetooth will use this
26{
27 SerialDebug.printf("M5Atom_HDriverModuleClass isPTFeeder = TRUE\n");
28
29 return true;
30}
31
32//! Data members of class
33//! Generic config info .. specific the the sensor type
34
35//!starts the PTStepper
37{
38}
39
40//!setup the PTStepper
42{
43 SerialDebug.printf("M5Atom_HDriverModuleClass::setup_M5AtomClassType\n");
44#ifdef USE_FAST_LED
45 //!NOTE: this could probably be done by ESP_IOT.ino .. but for now keep here (and in the other ATOM code..)
47 // fillpix(L_GREEN);
49
50#endif
51
52}
53
54//! stops motor
56{
57
58}
59
60//!setup the PTStepper
62{
63}
64
65//! ATOM specific
66
67//! these are from the ATOM
68
69//! 8.28.23 Adding a way for others to get informed on messages that arrive
70//! for the set,val
71//! 12.27.23 support setName == "HDriver"
72//! 1.10.24 if deviceNameSpecified then this matches this device, otherwise for all.
73//! It's up to the receiver to decide if it has to be specified
74void M5Atom_HDriverModuleClass::messageSetVal_M5AtomClassType(char *setName, char* valValue, boolean deviceNameSpecified)
75{
76
77}
78
79//! 12.28.23, 8.28.23 Adding a way for others to get informed on messages that arrive
80//! for the send -
81void M5Atom_HDriverModuleClass::messageSend_M5AtomClassType(char *sendValue, boolean deviceNameSpecified)
82{
83 SerialDebug.printf("M5Atom_HDriverModuleClass::messageSend_M5AtomClassType(%s)\n", sendValue);
84
85}
86
87//! BUTTON PROCESSING abstraction
88//!short press on buttonA (top button)
90{
91 SerialDebug.println("M5Atom::buttonA_ShortPress_M5AtomClassType");
92 //! feed
93 SerialDebug.printf("Feed BLE\n");
94 // send the _lastSemanticMarker again ...
95 //!send this as a DOCFOLLOW message
96 //sendSemanticMarkerDocFollow_mainModule(_lastSemanticMarker);
97 // strcpy(_lastSemanticMarker,"https://iDogWatch.com/bot/feed/test/test");
98
99 ///feed always (done after the code below..)
101}
102//!long press on buttonA (top button)
104{
105
106 SerialDebug.println("M5Atom_HDriverModuleClass::buttonA_LongPress_M5AtomClassType");
107#ifdef REFACTORED_TO_BASE
108
109 SerialDebug.printf("CLEAN CREDENTIALS and reboot to AP mode\n");
110
111 //! dispatches a call to the command specified. This is run on the next loop()
113#endif
114
115}
116
117//!returns a string in in URL so: status&battery=84'&buzzon='off' } .. etc
118//!starts with "&"*
120{
121 //! 8.4.25 add k=HD (HDriver)
122 return (char*)"&k=HD";
123}
124
125//!returns a string in in JSON so: status&battery=84'&buzzon='off' } .. etc
126//! (SINGLE QUOTES)
128{
129 return (char*)"'kind':'HD'";
130}
void setup_M5Display()
the setup() no loop()
Definition: M5Display.cpp:11
void fillpix(CRGB Color)
color the button light
Definition: M5Display.cpp:67
#define L_BLUE
Definition: M5Display.h:38
void main_dispatchAsyncCommand(int asyncCallCommand)
checks if any async commands are in 'dispatch' mode, and if so, invokes them, and sets their flag to ...
#define ASYNC_SEND_MQTT_FEED_MESSAGE
sends a message (like FEED) on the users topic
Definition: MainModule.h:207
#define ASYNC_CALL_CLEAN_CREDENTIALS
cleans out the credentials and restarts in AP (Access Point) mode.
Definition: MainModule.h:197
void loop_M5AtomClassType()
setup the PTStepper
void messageSetVal_M5AtomClassType(char *setName, char *valValue, boolean deviceNameSpecified)
ATOM specific.
M5Atom_HDriverModuleClass(char *config)
constructor
void buttonA_LongPress_M5AtomClassType()
long press on buttonA (top button)
void start_M5AtomClassType()
starts the PTStepper
void messageSend_M5AtomClassType(char *sendValue, boolean deviceNameSpecified)
void setup_M5AtomClassType()
setup the PTStepper
An mostly virtual class.