You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to run the SimpleReceiver on the second core of the D32 but it ends in a boot loop. I already switched to the D32 from the S3 because the S3 even had the boot loops on single core usage (fixed now as I have seen in the issues).
Single core works on the D32.
Modified sample code:
#include <Arduino.h>
#include "PinDefinitionsAndMore.h"
#define IRMP_PROTOCOL_NAMES 1 // Enable protocol number mapping to protocol strings - requires some FLASH. Must before #include <irmp*>
#define IRMP_SUPPORT_NEC_PROTOCOL 1 // this enables only one protocol
#if defined(ALTERNATIVE_IR_FEEDBACK_LED_PIN)
#define IRMP_FEEDBACK_LED_PIN ALTERNATIVE_IR_FEEDBACK_LED_PIN
#endif
#include <irmp.hpp>
IRMP_DATA irmp_data;
TaskHandle_t Task1;
void Task1code( void * pvParameters ) {
for (;;) {
if (irmp_get_data(&irmp_data)) {
/*
* Skip repetitions of command
*/
if (!(irmp_data.flags & IRMP_FLAG_REPETITION)) {
/*
* Here data is available and is no repetition -> evaluate IR command
*/
switch (irmp_data.command) {
case 0x48: // 72
case 0x40: // 64
digitalWrite(LED_BUILTIN, LOW);
delay(4000);
break;
default:
digitalWrite(LED_BUILTIN, HIGH);
break;
}
}
irmp_result_print(&irmp_data);
}
}
}
void setup() {
pinMode(LED_BUILTIN, OUTPUT);
Serial.begin(115200);
#if defined(__AVR_ATmega32U4__) || defined(SERIAL_PORT_USBVIRTUAL) || defined(SERIAL_USB) /*stm32duino*/|| defined(USBCON) /*STM32_stm32*/|| defined(SERIALUSB_PID) || defined(ARDUINO_attiny3217)
delay(4000); // To be able to connect Serial monitor after reset or power up and before first print out. Do not wait for an attached Serial Monitor!
#endif
// Just to know which program is running on my Arduino
Serial.println(F("START " __FILE__ " from " __DATE__ "\r\nUsing library version " VERSION_IRMP));
irmp_init();
Serial.print(F("Ready to receive IR signals of protocols: "));
irmp_print_active_protocols(&Serial);
Serial.println(F("at pin " STR(IRMP_INPUT_PIN)));
/*
* We use LED_BUILTIN as feedback for commands 0x40 and 0x48 and cannot use it as feedback LED for receiving
*/
#if defined(ALTERNATIVE_IR_FEEDBACK_LED_PIN)
irmp_irsnd_LEDFeedback(true); // Enable receive signal feedback at ALTERNATIVE_IR_FEEDBACK_LED_PIN
Serial.println(F("IR feedback pin is " STR(ALTERNATIVE_IR_FEEDBACK_LED_PIN)));
#endif
xTaskCreatePinnedToCore(
Task1code, /* Task function. */
"Task1", /* name of task. */
10000, /* Stack size of task */
NULL, /* parameter of the task */
1, /* priority of the task */
&Task1, /* Task handle to keep track of created task */
0); /* pin task to core 0 */
}
void loop() {
/*
* Check if new data available and get them
*/
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am trying to run the SimpleReceiver on the second core of the D32 but it ends in a boot loop. I already switched to the D32 from the S3 because the S3 even had the boot loops on single core usage (fixed now as I have seen in the issues).
Single core works on the D32.
Modified sample code:
Beta Was this translation helpful? Give feedback.
All reactions