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);
48 fillpix(L_BLUE);
49#else
50 //! 8.2.26 LED working
52
53#endif
54
55}
56
57//! stops motor
59{
60
61}
62
63//!setup the PTStepper
65{
66}
67
68//! ATOM specific
69
70//! these are from the ATOM
71
72//! 8.28.23 Adding a way for others to get informed on messages that arrive
73//! for the set,val
74//! 12.27.23 support setName == "HDriver"
75//! 1.10.24 if deviceNameSpecified then this matches this device, otherwise for all.
76//! It's up to the receiver to decide if it has to be specified
77void M5Atom_HDriverModuleClass::messageSetVal_M5AtomClassType(char *setName, char* valValue, boolean deviceNameSpecified)
78{
79
80}
81
82//! 12.28.23, 8.28.23 Adding a way for others to get informed on messages that arrive
83//! for the send -
84void M5Atom_HDriverModuleClass::messageSend_M5AtomClassType(char *sendValue, boolean deviceNameSpecified)
85{
86 SerialDebug.printf("M5Atom_HDriverModuleClass::messageSend_M5AtomClassType(%s)\n", sendValue);
87
88}
89
90//! BUTTON PROCESSING abstraction
91//!short press on buttonA (top button)
93{
94 SerialDebug.println("M5Atom::buttonA_ShortPress_M5AtomClassType");
95 //! feed
96 SerialDebug.printf("Feed BLE\n");
97 // send the _lastSemanticMarker again ...
98 //!send this as a DOCFOLLOW message
99 //sendSemanticMarkerDocFollow_mainModule(_lastSemanticMarker);
100 // strcpy(_lastSemanticMarker,"https://iDogWatch.com/bot/feed/test/test");
101
102 ///feed always (done after the code below..)
104}
105//!long press on buttonA (top button)
107{
108
109 SerialDebug.println("M5Atom_HDriverModuleClass::buttonA_LongPress_M5AtomClassType");
110#ifdef REFACTORED_TO_BASE
111
112 SerialDebug.printf("CLEAN CREDENTIALS and reboot to AP mode\n");
113
114 //! dispatches a call to the command specified. This is run on the next loop()
116#endif
117
118}
119
120//!returns a string in in URL so: status&battery=84'&buzzon='off' } .. etc
121//!starts with "&"*
123{
124 //! 8.4.25 add k=HD (HDriver)
125 return (char*)"&k=HD";
126}
127
128//!returns a string in in JSON so: status&battery=84'&buzzon='off' } .. etc
129//! (SINGLE QUOTES)
131{
132 return (char*)"'kind':'HD'";
133}
void setup_M5Display()
the setup() no loop()
Definition: M5Display.cpp:5
void main_dispatchAsyncCommand(int asyncCallCommand)
checks if any async commands are in 'dispatch' mode, and if so, invokes them, and sets their flag to ...
void setLEDColor(ColorsUnified color)
uses colors.. _GREEN to be typed values
#define ASYNC_SEND_MQTT_FEED_MESSAGE
sends a message (like FEED) on the users topic
Definition: MainModule.h:213
#define ASYNC_CALL_CLEAN_CREDENTIALS
cleans out the credentials and restarts in AP (Access Point) mode.
Definition: MainModule.h:203
@ BLUE_LED
Definition: MainModule.h:537
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.