Добавлена библиотека IRremote #10

Merged
klassents merged 75 commits from dev into v0.5.0 2025-01-25 06:52:11 +03:00
4 changed files with 9 additions and 11 deletions
Showing only changes of commit f3efccf099 - Show all commits

View File

@ -30,8 +30,6 @@
*/
#include <Arduino.h>
//#include "PinDefinitionsAndMore.h" // Define macros for input and output pin etc.
#if !defined(RAW_BUFFER_LENGTH)
#define RAW_BUFFER_LENGTH 750
#endif
@ -48,7 +46,7 @@
#define STR(x) STR_HELPER(x)
#endif
#define IR_RECEIVE_PIN 2
#define IR_RECEIVE_PIN 4 // 4 P1_9
/*
* Create the class, which itself uses the IRrecv class from IRremote

View File

@ -45,7 +45,7 @@
#endif
#ifndef IR_SEND_PIN
#define IR_SEND_PIN P0_0 // 3
#define IR_SEND_PIN 3 // P0_0
#endif
#include <IRremote.hpp>

View File

@ -50,8 +50,8 @@
#include <Arduino.h>
//#include "PinDefinitionsAndMore.h" // Set IR_RECEIVE_PIN for different CPU's
#define IR_RECEIVE_PIN 2
// IR_RECEIVE_PIN must be avialable to use in attachInterrupt()
#define IR_RECEIVE_PIN 4 // 4 P1_9
/*

View File

@ -90,10 +90,10 @@
#define STR(x) STR_HELPER(x)
#endif
#define IR_SEND_PIN 3
#define IR_RECEIVE_PIN 4
#define IR_SEND_PIN 3 // P0_0
#define IR_RECEIVE_PIN 4 // P0_1
#define BTN_ACTIVE_STATE HIGH
#define BTN_ACTIVE_STATE HIGH // HIGH for Elbear boards, LOW for Start board
#include <IRremote.hpp>
@ -111,7 +111,7 @@ volatile bool sDataJustReceived = false;
void ReceiveCompleteCallbackHandler();
void setup() {
pinMode(BTN_BUILTIN, INPUT_PULLUP);
pinMode(BTN_BUILTIN, INPUT);
Serial.begin(9600);
while (!Serial)
@ -139,7 +139,7 @@ void setup() {
Serial.println(F("Receive buffer length is " STR(RAW_BUFFER_LENGTH)));
#if defined(IR_SEND_PIN)
IrSender.begin(); // Start with IR_SEND_PIN -which is defined in PinDefinitionsAndMore.h- as send pin and enable feedback LED at default feedback LED pin
IrSender.begin(); // Start with IR_SEND_PIN as send pin and enable feedback LED at default feedback LED pin
Serial.println(F("Send IR signals at pin " STR(IR_SEND_PIN)));
#else
// Here the macro IR_SEND_PIN is not defined or undefined above with #undef IR_SEND_PIN