добавила пин для платы старт
This commit is contained in:
parent
c6c671e7a8
commit
faf859fc96
@ -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
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user