добавила пин для платы старт
This commit is contained in:
parent
95884860ad
commit
f3efccf099
@ -30,8 +30,6 @@
|
|||||||
*/
|
*/
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
|
|
||||||
//#include "PinDefinitionsAndMore.h" // Define macros for input and output pin etc.
|
|
||||||
|
|
||||||
#if !defined(RAW_BUFFER_LENGTH)
|
#if !defined(RAW_BUFFER_LENGTH)
|
||||||
#define RAW_BUFFER_LENGTH 750
|
#define RAW_BUFFER_LENGTH 750
|
||||||
#endif
|
#endif
|
||||||
@ -48,7 +46,7 @@
|
|||||||
#define STR(x) STR_HELPER(x)
|
#define STR(x) STR_HELPER(x)
|
||||||
#endif
|
#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
|
* Create the class, which itself uses the IRrecv class from IRremote
|
||||||
|
|||||||
@ -45,7 +45,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef IR_SEND_PIN
|
#ifndef IR_SEND_PIN
|
||||||
#define IR_SEND_PIN P0_0 // 3
|
#define IR_SEND_PIN 3 // P0_0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <IRremote.hpp>
|
#include <IRremote.hpp>
|
||||||
|
|||||||
@ -50,8 +50,8 @@
|
|||||||
|
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
|
|
||||||
//#include "PinDefinitionsAndMore.h" // Set IR_RECEIVE_PIN for different CPU's
|
// IR_RECEIVE_PIN must be avialable to use in attachInterrupt()
|
||||||
#define IR_RECEIVE_PIN 2
|
#define IR_RECEIVE_PIN 4 // 4 P1_9
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -90,10 +90,10 @@
|
|||||||
#define STR(x) STR_HELPER(x)
|
#define STR(x) STR_HELPER(x)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define IR_SEND_PIN 3
|
#define IR_SEND_PIN 3 // P0_0
|
||||||
#define IR_RECEIVE_PIN 4
|
#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>
|
#include <IRremote.hpp>
|
||||||
|
|
||||||
@ -111,7 +111,7 @@ volatile bool sDataJustReceived = false;
|
|||||||
void ReceiveCompleteCallbackHandler();
|
void ReceiveCompleteCallbackHandler();
|
||||||
|
|
||||||
void setup() {
|
void setup() {
|
||||||
pinMode(BTN_BUILTIN, INPUT_PULLUP);
|
pinMode(BTN_BUILTIN, INPUT);
|
||||||
|
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
while (!Serial)
|
while (!Serial)
|
||||||
@ -139,7 +139,7 @@ void setup() {
|
|||||||
Serial.println(F("Receive buffer length is " STR(RAW_BUFFER_LENGTH)));
|
Serial.println(F("Receive buffer length is " STR(RAW_BUFFER_LENGTH)));
|
||||||
|
|
||||||
#if defined(IR_SEND_PIN)
|
#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)));
|
Serial.println(F("Send IR signals at pin " STR(IR_SEND_PIN)));
|
||||||
#else
|
#else
|
||||||
// Here the macro IR_SEND_PIN is not defined or undefined above with #undef IR_SEND_PIN
|
// 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