-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathUtils.h
More file actions
25 lines (21 loc) · 773 Bytes
/
Copy pathUtils.h
File metadata and controls
25 lines (21 loc) · 773 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#ifndef UTILS_H
#define UTILS_H
#include <Arduino.h>
/**
* Extract a value from a delimited string by index.
* @param data The input string
* @param separator The delimiter character
* @param index The index of the value to extract (0-based)
* @return The extracted substring, or empty string if index out of bounds
*/
String getValue(String data, char separator, int index);
/**
* Execute special mode with PWM-like control.
* Controls specified pin with configurable frequency and duty cycle ratio.
* @param pin GPIO pin to control
* @param duration_ms Total duration in milliseconds
* @param freq Frequency in Hz
* @param ratio ON/OFF time ratio
*/
void executeSpecialMode(int pin, unsigned long duration_ms, float freq, float ratio);
#endif // UTILS_H