STM32F103C6(Blue Pill) IR Communication

Post here first, or if you can't find a relevant section!
Post Reply
myksj1105
Posts: 54
Joined: Sun Jun 18, 2023 11:35 am

STM32F103C6(Blue Pill) IR Communication

Post by myksj1105 »

viewtopic.php?t=951

hello. Thank you for your interest in my writing.

1. I want to test transmission and reception through the IR sensor.
2. The reception band is approximately 38kHz.

Is there anything I should refer to in the library?
Please confirm.

'site: https://github.com/ukw100/IRMP'
namagama37
Posts: 1
Joined: Mon Jan 22, 2024 8:25 am

Re: STM32F103C6(Blue Pill) IR Communication

Post by namagama37 »

yes
davisjanden1
Posts: 1
Joined: Thu Jan 25, 2024 1:28 am

Re: STM32F103C6(Blue Pill) IR Communication

Post by davisjanden1 »

To test transmission and reception through an IR sensor, particularly when dealing with a reception band of approximately 38kHz, the IRMP (InfraRed Multi Protocol) library you mentioned seems like a suitable choice. Here are some steps you can take and considerations to keep in mind:
Library Documentation:
Visit the official documentation of the IRMP library on GitHub (https://github.com/ukw100/IRMP). Carefully go through the documentation to understand the library's features, supported protocols, and examples provided.
Library Installation:
Follow the installation instructions provided in the library documentation. Make sure the library is properly installed in your Arduino IDE.
Example Codes:
Explore the example codes provided in the library. These examples can serve as a starting point for testing transmission and reception. Look for examples related to both IR transmission and reception.
IR Sensor and Transmitter:
Ensure that your IR sensor and transmitter are compatible with the library. The library documentation may specify supported devices or provide guidelines for choosing suitable components.
IR Remote Control Protocol:
If you are working with a specific IR remote control protocol (like NEC, Sony, etc.), check if the library supports that protocol. The IRMP library is designed to handle various protocols, but it's essential to verify compatibility.
Testing IR Reception:
Utilize the library's functions to receive IR signals. You may need to configure the library to match the modulation frequency of your IR sensor (38kHz). Check for functions related to decoding received IR signals.
cpp
Copy code
// Example for IR reception
#include <IRMP.h>
void setup() {
IRMP.begin(); // Initialize the IRMP library
}
void loop() {
if (IRMP.available()) {
unsigned long receivedValue = IRMP.read();
// Process the received IR signal
// ...
}
}
Testing IR Transmission:
Experiment with IR transmission using the library's provided functions. Ensure that the library allows you to specify the carrier frequency for transmission (38kHz in your case).
cpp
Copy code
// Example for IR transmission
#include <IRMP.h>
void setup() {
IRMP.begin(); // Initialize the IRMP library
}

void loop() {
// Transmit an IR signal
IRMP.transmit(NEC, 0x12345678); // Example for NEC protocol
delay(1000); // Wait for a second
}
Signal Analysis:
Consider using an oscilloscope or an IR receiver module connected to an Arduino to analyze the transmitted and received IR signals. This can help ensure that the signals match the expected characteristics.
By following these steps and referring to the IRMP library documentation and examples, you should be able to set up a test for transmission and reception through the IR sensor with a 38kHz carrier frequency.
Post Reply

Return to “General discussion”