Control of an IR emitter transistor #71
robzed
started this conversation in
Show and tell
Replies: 1 comment
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Control of an IR emitter transistor.
Ran by this code:
https://github.com/robzed/ukmarsbot_forth/blob/master/for_rp2040/robot-adc.fth
line 145 turns on the IR LED
dup EMITTER_B pin!
This is the rising edge on the image above.
Then we ask the hardware to read 4 ADC channels and interrupt us when the FIFO is full.
On the next interrupt, line 151 turns off the IR LED
false EMITTER_B pin!
This is the falling edge on the image above.
From rising to falling is about 25 us.
We repeat this sequence every 2ms.
Interrupt latency isn't a problem here.
Beta Was this translation helpful? Give feedback.
All reactions