2024-01-10 12:43:07 +00:00
|
|
|
#pragma once
|
2024-01-10 10:10:51 +00:00
|
|
|
#include <driver/rmt.h>
|
2024-01-10 12:43:07 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Class for sending IR signals
|
|
|
|
*
|
|
|
|
* @warning This class takes one of the RMT channels, The ESP32 has 8 RMT channels, so you can use 7 IRBlaster objects at the same time (or 6 if you use the IRReceiver class)
|
|
|
|
*/
|
2024-01-10 10:10:51 +00:00
|
|
|
class IRBlaster
|
|
|
|
{
|
|
|
|
public:
|
2024-01-10 12:43:07 +00:00
|
|
|
IRBlaster(const uint8_t pin, rmt_channel_t channel);
|
|
|
|
IRBlaster(const uint8_t pin);
|
|
|
|
~IRBlaster();
|
|
|
|
void send(const uint16_t *data, const size_t size);
|
2024-01-10 10:10:51 +00:00
|
|
|
private:
|
|
|
|
rmt_channel_t channel;
|
|
|
|
};
|