Closed ninadshah18 closed 3 years ago
Where do you connect the IR LED? For testing it is easier to connect a standard LED. Did you check other pins (especially pin4)?
Where is the #define IRSND_OUTPUT_PIN 3
used? Where should it be used?
I just updated the repository. Please using the new repo content for testing.
I have removed #define IRSND_OUTPUT_PIN 3 and used default pin 4 but still, it is not working. BTQ pin4 for STM32L476 is not a PWM pin. I have pulled the latest repository from master as below but still, it is not blinking.
~/Arduino/libraries/IRMP$ git pull remote: Enumerating objects: 18, done. remote: Counting objects: 100% (18/18), done. remote: Compressing objects: 100% (4/4), done. remote: Total 18 (delta 14), reused 18 (delta 14), pack-reused 0 Unpacking objects: 100% (18/18), done. From github.com:ukw100/IRMP abca5bc..4664059 master -> origin/master Updating abca5bc..4664059 Fast-forward .github/issue_template.md | 1 + examples/AllProtocols/PinDefinitionsAndMore.h | 10 +++++++++- examples/Callback/PinDefinitionsAndMore.h | 10 +++++++++- examples/Interrupt/PinDefinitionsAndMore.h | 10 +++++++++- examples/MinimalReceiver/PinDefinitionsAndMore.h | 10 +++++++++- examples/OneProtocol/PinDefinitionsAndMore.h | 10 +++++++++- examples/RFProtocols/PinDefinitionsAndMore.h | 10 +++++++++- examples/ReceiveAndSend/PinDefinitionsAndMore.h | 10 +++++++++- examples/ReceiveAndSendDynamicPins/PinDefinitionsAndMore.h | 10 +++++++++- examples/SimpleReceiver/PinDefinitionsAndMore.h | 10 +++++++++- examples/SimpleSender/PinDefinitionsAndMore.h | 10 +++++++++- src/IRTimer.cpp.h | 3 +++ 12 files changed, 94 insertions(+), 10 deletions(-)
The pins etc. must be defined BEFORE the line #include
I have already defined it before #include
How and where do you specify, that you have STM32L Series?
I haven't specify it anywhere as there is no specific code for STM32L series. So, it takes default configuration and code path. My thinking is STM32L may require some extra processing or configuration which is not supported in current library of IRMP.
OK I added some definitions. Please try the latest version from the repo.
I have tried with both default pin (pin 4) and custom defined pin (pin 3), but still it didn't work.
I updated the repo. Please activate #define IRMP_MEASURE_TIMING in PinDefinitionsAndMore.h and connect a LED to this pin. It must flicker.
I tried #define IRMP_MEASURE_TIMING 3 but still no flickering.
Have you checked the other examples? Just to be sure time is working.
hi
this library for stm32f1 problem
my code :
`#include
//#define IRMP_PROTOCOL_NAMES 1
//#include
IRMP_DATA irmp_data; IRMP_DATA irsnd_data;
void setup() { Serial1.begin(115200); // irmp_init(); irsnd_init(); irmp_irsnd_LEDFeedback(true); // Enable send signal feedback at LED_BUILTIN
irsnd_data.protocol = IRMP_SAMSUNG32_PROTOCOL; irsnd_data.address = 0x0707; irsnd_data.command = 0xFB04; irsnd_data.flags = 0; // repeat frame 0 time irsnd_send_data(&irsnd_data, false); }
void loop() {
delay(500);
uint8_t tNextCommand = irsnd_data.command;
tNextCommand++;
// For my Samsung the high byte is the negative of the low byte
irsnd_data.command = ((~tNextCommand) << 8) | tNextCommand;
Serial.print(F("Send 0x"));
Serial.println(irsnd_data.command, HEX);
irsnd_send_data(&irsnd_data, false); // This stores timer state and restores it after sending
}`
when #include
together not ok !
Thanks for reporting the error.
You forgot to define USE_ONE_TIMER_FOR_IRMP_AND_IRSND
and the automatic warning failed.
I fixed the warning now in the new release.
Bug Report
Arduino Platform
IDE
IR-Protocol
Example to reproduce the issue
Pin(s) used for IR-receive, if not default
Version
Current behavior
/*
*/
include
/*
include "PinDefinitionsAndMore.h"
//#define IR_OUTPUT_IS_ACTIVE_LOW
include
/*
include
//#define STM32F1xx //#define STM32L4xx
define IRSND_OUTPUT_PIN 3
IRMP_DATA irsnd_data;
void setup() { Serial.begin(115200);
if defined(__AVR_ATmega32U4__)
endif
if defined(SERIAL_USB) || defined(SERIAL_PORT_USBVIRTUAL)
endif
if defined(ESP8266)
endif
if defined(STM32F1xx)
else
endif
}
void loop() { delay(5000); uint8_t tNextCommand = irsnd_data.command; tNextCommand++; // For my Samsung the high byte is the negative of the low byte irsnd_data.command = ((~tNextCommand) << 8) | tNextCommand;
// #if defined(STM32F1xx) // Serial.println(F("Ready to send IR signals at pin PA5")); // the internal pin numbers are crazy for the STM32 Boards library //#else Serial.println(F("Ready to send IR signals at pin " STR(IRSND_OUTPUT_PIN))); //#endif
}
I am expecting IR LED to blink when seen from the camera but it was not blinking.
Expected behavior
I am expecting that the connecter IR LED should blink when IR code is being emitted.
Error output
Additional context