Page 1 of 1

Receive input from z-ranger deck

Posted: Sun Sep 24, 2017 10:49 pm
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

Re: Receive input from z-ranger deck

Posted: Mon Sep 25, 2017 12:07 pm
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.

Re: Receive input from z-ranger deck

Posted: Mon Sep 25, 2017 3:13 pm
by nickl
Thank you very much! This is very helpful!!

Best