Adding a proximity sensor

Firmware/software/electronics/mechanics
Post Reply
jonaspriest
Beginner
Posts: 4
Joined: Mon Apr 20, 2015 9:39 am

Adding a proximity sensor

Post 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!
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Adding a proximity sensor

Post 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.
Post Reply