Benjamin1971 Posted March 5, 2023 Report Posted March 5, 2023 I have been messing around with the IR transmit capability of my flirc. I am able to send IR signals using the flirc_util app, but it takes around 800ms to send a single command. I suspect it's because flirc_util opens the device, sends the signal, and then closes the device. If I try with the repeat set higher, it doesn't significantly affect the timing. It looks like the SDK provides static library (libflirc.a). I'm programming in python on a raspberry pi 3, which doesn't work with static libraries. Is it possible to get direct access to the flirc to open the device and send signals? Or possibly get a dynamic library? Thanks, Ben 1 Quote
parkerlreed Posted January 3, 2025 Report Posted January 3, 2025 Also looking for something like this. I tried adapting the `ir` example from the sdk but it just sends the code type and hex value to the statically linked library. In my case I want to keep the device open and send raw IR codes programmatically. Quote
parkerlreed Posted January 3, 2025 Report Posted January 3, 2025 (edited) So I managed to adapt an example from a project that used the C library to transmit codes. fl_transmit_raw says its taking 65 ms to run but I think running on the main thread is slowing it down with the UI waiting for it. The code I built out is here https://gist.github.com/parkerlreed/4f7d2026c5c4a29a4a0cf39e40705473 EDIT: Oh just realized I put the device init and disconnect in the button function... I'll separate these out and see how it performs. Edited January 3, 2025 by parkerlreed Quote
parkerlreed Posted January 3, 2025 Report Posted January 3, 2025 This is working much better. Example here https://github.com/parkerlreed/flirc_sendir_raw Quote
frangipan Posted February 2, 2025 Report Posted February 2, 2025 @Benjamin1971 another alternative to @parkerlreed's excellent solution is to use the "shell" mode of flirc_util. Here is a project which uses this approach with Python: flirc_repeater/flirc_repeater.py at main · andrewfraley/flirc_repeater · GitHub Look at the "wait_loop" function. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.