Page 1 of 1

Adding a proximity sensor

Posted: Mon May 11, 2015 11:50 am
by jonaspriest
Hi guys,

my fellow-students and me from a project working with the Crazyflie have just installed a proximity sensor on top of our CF 2.0, just like this guy did it:
https://cfusting.wordpress.com/2013/07/ ... ty-sensor/

We used his fork of the CF-firmware and tried to overtake his changes, stated by a diff between his fork and the original CF-firmware:
https://bitbucket.org/cfusting/crazyfli ... at=default

Our result can be seen in the last commits I did: https://github.com/fred-project/crazyfl ... crazyflie2

BUT, it doesn't work and I don't know why :cry: The "adc.vProx" logging variable is not available in the TOC for some reason after flashing the drone with our firmware fork. Is there any errors you could think of? Will using the wrong GPIO-PIN for input also result in that error we currently experience? Maybe we access the wrong pin.
Our current hardware setup looks like this: http://fred-project.github.io/2015/04/2 ... ensor.html (also with photos)

I hope someone can help, thank you!

Re: Adding a proximity sensor

Posted: Thu May 28, 2015 12:37 pm
by tobias
Hi,

I think the problem lies in that the guide was made for Crazyflie 1.0. The ADC peripheral on the STM32F405 (CF2) is a bit different then on the STM32F103 (CF1). Please look in this post on ways to currently solve it.