raspberrypi / pico-examples

BSD 3-Clause "New" or "Revised" License
2.93k stars 838 forks source link

Question about the example ir_nec #572

Open michcfr opened 18 hours ago

michcfr commented 18 hours ago

Hello My question is about the example /pio/ir_nec What parameters should I change if I want the carrier to be at 15Mhz instead of 38Khz?

thank you

lurch commented 15 hours ago

ping @mjcross who contributed this example in #129

mjcross commented 3 hours ago

I'll take a look

michcfr commented 3 hours ago

thank you. I would also change the transmission protocol.

mjcross commented 10 minutes ago

@michcfr asked:

What parameters should I change if I want the carrier to be at 15Mhz instead of 38Khz?

If you want to use a different carrier frequency, the relevant parameters are in the calls to nec_carrier_burst_program_init() and nec_carrier_control_program_init() in nec_transmit_library/nec_transmit.c.

However be aware that you will need to find (or construct) an IR receiver module that supports your chosen carrier frequency. The device used in the example (VS1838b) only supports 38 kHz. You might find others at up to 56 kHz but I think 15 MHz is rather unlikely.

mjcross commented 8 minutes ago

I would also change the transmission protocol

That would certainly be outside the scope of this example.

mjcross commented 6 minutes ago

@lurch close?