Infrared PWM on Crazyflie

Firmware/software/electronics/mechanics
Post Reply
crazylazy
Beginner
Posts: 3
Joined: Wed Feb 07, 2018 7:16 pm

Infrared PWM on Crazyflie

Post by crazylazy » Thu May 03, 2018 3:00 am

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

tobias
Bitcraze
Posts: 1722
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Infrared PWM on Crazyflie

Post by tobias » Thu May 03, 2018 11:32 am

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:

crazylazy
Beginner
Posts: 3
Joined: Wed Feb 07, 2018 7:16 pm

Re: Infrared PWM on Crazyflie

Post by crazylazy » Tue May 08, 2018 2:57 am

Thank you, Tobias! I will look into it.

crazylazy
Beginner
Posts: 3
Joined: Wed Feb 07, 2018 7:16 pm

Re: Infrared PWM on Crazyflie

Post by crazylazy » Wed May 09, 2018 4:47 am

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

Post Reply