Page 1 of 1

Infrared PWM on Crazyflie

Posted: Thu May 03, 2018 3:00 am
by crazylazy
Good day everyone. I'm trying to build an infrared transceiver for the crazyflie which can send and receive PWM infrared signals (kind of like a lazertag but with the crazyflie instead of a laser gun). I would also want everything to be controlled using the python client wherein I just change the values of the parameters in order to adjust the frequency.

I have already learned the basics like building a deck driver with examples such as the myled and the traffic light from hackster.io. The next step Im doing is trying to PWM an infrared LED to about 36kHz but I am stuck with this. I thought it would be as straightforward as an Arduino but from the previous posts Ive read in this forum, I simply cannot grasp how to apply the timers, etc. Any help would be much appreciated, thank you. :D

Re: Infrared PWM on Crazyflie

Posted: Thu May 03, 2018 11:32 am
by tobias
Hi!

A long time ago I started to experiment with a "gaming" deck, or basically a laser tag deck. It was so long ago we did not even have the deck framework in place. Therefore some things should be moved to a deck instead.

What I have done is that I have rebased the "gaming" branch code from the master branch so that it at least compiles and is up to date but it is not tested. In there, there are three files that handle IR, ir_tx.c ir_rx.c and ir_code.c. That should give you a base or some inspiration. Unfortunately I don't have any time to do more then that :oops:

Re: Infrared PWM on Crazyflie

Posted: Tue May 08, 2018 2:57 am
by crazylazy
Thank you, Tobias! I will look into it.

Re: Infrared PWM on Crazyflie

Posted: Wed May 09, 2018 4:47 am
by crazylazy
Im very new to the crazyflie (still a college student) and would like to build the deck firmware for this. Unfortunately, I dont know where to start. I have some basic knowledge in C and C++ but after reading everything, I still do not have an idea on how to build it. It would be very helpful if you give me something to start with or maybe some instructions so i could get started with it. Thank you very much! :D