Freqout,PWM, Infrared
j
Posts: 1
Hi
I´m playing with javelin stamp and a Sumobot. Right now I´m trying to get the IR to work with javelin..
I´m using the Freqout class for generate the waveform but I don´t understand how I should get it to generate 38.5KHz?
Freqout use the PWM class with the timebase 8.68us and the underlying update method in PWM class only has int as parameter to give the number of 8.68us period. It seems impossible to generate freq as 38.5KHz??
Any suggestions...
/J
I´m playing with javelin stamp and a Sumobot. Right now I´m trying to get the IR to work with javelin..
I´m using the Freqout class for generate the waveform but I don´t understand how I should get it to generate 38.5KHz?
Freqout use the PWM class with the timebase 8.68us and the underlying update method in PWM class only has int as parameter to give the number of 8.68us period. It seems impossible to generate freq as 38.5KHz??
Any suggestions...
/J
Comments
Since Freqout is derived stamp.core.PWM, then the on and off periods for the waveform must be an integer multiple of 8.68us.
So, the highest possible frequency that can be generated is 1/(2*8.68us) or 57.603 kHz. The next lower frequency would be 28.801 kHz.
Sorry!
-- Paul
It explains how to use the Javelin for IR Distance detection.