Receive input from z-ranger deck

Firmware/software/electronics/mechanics
Post Reply
nickl
Beginner
Posts: 2
Joined: Sun Sep 24, 2017 10:45 pm

Receive input from z-ranger deck

Post by nickl »

Would it be possible to use input from the z-ranger deck to control how the crazyflie acts? Specifically I would like the crazyflie to land when it detects itself flying over a platform that is maybe 6 inches tall. Im writing code in the cflib library, how is the information from the z-ranger deck received in code?

Any help would be appreciated
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Receive input from z-ranger deck

Post by arnaud »

Hi,

You can receive the Z-Ranger reading using the log subsystem. In the crazyflie python lib example folder you will find an example that shows how to get log reading from the Crazyflie. The log variable for the zranger range is range.zrange.
nickl
Beginner
Posts: 2
Joined: Sun Sep 24, 2017 10:45 pm

Re: Receive input from z-ranger deck

Post by nickl »

Thank you very much! This is very helpful!!

Best
Post Reply