0

Sending infrared pulses in a loop terminates unexpectedly
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Sending infrared pulses in a loop terminates unexpectedly

by kevinjwalters on Mon Jun 10, 2019 7:12 am

This trivial code runs ok for about 3 minutes sending an infrared burst every 200ms but then terminates and then it goes downhill leaving the infra-red diode pulsing away continuously circa 38kHz, e.g. sending one "mega-long" mark (ASK).

infinite-loop-sending-IR-terminates-leaving-IR-pulsing-i.png
infinite-loop-sending-IR-terminates-leaving-IR-pulsing-i.png (7.19 KiB) Viewed 135 times


This is on:
Code: Select all | TOGGLE FULL SIZE
Adafruit Circuit Playground Express version:  1.4.30
Microsoft MakeCode version:  5.13.6
codal-circuit-playground runtime version:  v1.5.4-i2c_and_dac.0


The code is also available at: https://makecode.com/_9PsET1fvCEkE

I think this must be a s/w bug so I've ticketed it #1067.

(I was originally looking at this because I was interesting in the very quiet chugging noise that comes out of the CPX speaker. I think this is due to a side-effect of the high current demand from the IR diode impacting the 5v line, I can see Vout drop by about 0.4v with the pulsing.)
Last edited by kevinjwalters on Tue Jun 11, 2019 7:54 pm, edited 1 time in total.

kevinjwalters
 
Posts: 429
Joined: Sun Oct 01, 2017 3:15 pm

Re: Sending infrared pulses in a loop terminates unexpectedl

by johnpark on Tue Jun 11, 2019 11:43 am

Thanks for investigating this, I know there were some issue with IR and sound (and NeoPixel IIRC) happening together in the past, too.

johnpark
 
Posts: 515
Joined: Wed Mar 25, 2009 2:15 pm

Please be positive and constructive with your questions and comments.