Good day peoples, i am a starter, and i am getting two trouble to get my project on (automatic configure on samsung a.c.).
Using the example of library Infrared4Arduino (Multidecoder.ino) - example below, i dont undertand why in declaration RECEIVE_PIN, it use the letter "U" after of the pine number (static constexpr pin_t RECEIVE_PIN = 5U;)
I normaly use only the number of pine... this is right and why?
The second is about this info (// It requires a demodulating sensor connected to pin RECEIVE_PIN.), what is demodulating sensor? is the infrared sensor?
Thanks so much
// This sketch demonstrates the MultiDecoder.
// It requires a demodulating sensor connected to pin RECEIVE_PIN.
#include <IrReceiverSampler.h>
#include <MultiDecoder.h>
static constexpr pin_t RECEIVE_PIN = 5U;
static constexpr size_t BUFFERSIZE = 200U;
static constexpr uint32_t BAUD = 115200UL;
IrReceiver *receiver;
void setup() {
Serial.begin(BAUD);
receiver = IrReceiverSampler::newIrReceiverSampler(BUFFERSIZE, RECEIVE_PIN);
}
void loop() {
receiver->receive();
if (receiver->isEmpty())
Serial.println(F("timeout"));
else {
MultiDecoder decoder(*receiver);
if (decoder)
decoder.printDecode(Serial);
else
Serial.println(F("No decode"));
}
}