LDR Deck - Friday Speed Project

Discussions and questions about the Crazyflie Nano Quadcopter
Post Reply
Jens_Lee
Member
Posts: 40
Joined: Sun Nov 19, 2017 8:14 pm

LDR Deck - Friday Speed Project

Post by Jens_Lee » Mon Dec 11, 2017 3:02 pm

Hi All.

I'm currently doing a project, exploring how UAVs can be used for environmental surveys, in an architectural context.
I've been spending the last week trying to properly understand the i2c interface on the Crazyflie, but in the end had to give up, as I needed to get some data in. All about that data. So I grabbed the trusty LDR, a photo deck and a trimpot, since i didn't know the upper and lower resistance of the LDR, and threw a deck together in probably 10 mins. The driver took another hour, and presto, a flying sensor was born. The range is a little off, and it's not suitable for actual surveys, but for Proof of Concept, it's working like a charm.

The CF rocks, and the CFlib gives a lot of possibilities, even for non CS users.
Attachments
IMG_20171211_155700.jpg
IMG_20171211_154344.jpg

Jens_Lee
Member
Posts: 40
Joined: Sun Nov 19, 2017 8:14 pm

Re: LDR Deck - Friday Speed Project

Post by Jens_Lee » Mon Dec 11, 2017 3:50 pm

The initial mapping text.
Attachments
snip2.PNG
snip1.PNG
Capture2.PNG
Capture.PNG

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

Re: LDR Deck - Friday Speed Project

Post by tobias » Tue Dec 12, 2017 7:47 am

Nicely done!

Maybe I can help regarding the I2C interface? The functions to use are in i2cdev.c and should be pretty straight forward. If you are using the expansion port the I2C device is I2C1_DEV. As an example have a look in this file.

Jens_Lee
Member
Posts: 40
Joined: Sun Nov 19, 2017 8:14 pm

Re: LDR Deck - Friday Speed Project

Post by Jens_Lee » Tue Dec 12, 2017 11:25 am

Thank you Tobias.

I will give the i2cdev a go again today and report with any problems.

Jens_Lee
Member
Posts: 40
Joined: Sun Nov 19, 2017 8:14 pm

Re: LDR Deck - Friday Speed Project

Post by Jens_Lee » Tue Dec 12, 2017 12:20 pm

Maybe i should say that I'm trying to develop for the TSL2561 package.

Jens_Lee
Member
Posts: 40
Joined: Sun Nov 19, 2017 8:14 pm

Re: LDR Deck - Friday Speed Project

Post by Jens_Lee » Tue Dec 12, 2017 4:35 pm

Good news. From a fresh start based on your example, Tobias, i actually got it up and working now! Will post code as soon as it's human readable. And then there's a bit of for finishing the deck.

Pro tip, if you don't have the breakout deck, female-female jumper cables works really well.
IMG_20171212_172844.jpg

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

Re: LDR Deck - Friday Speed Project

Post by tobias » Wed Dec 13, 2017 9:24 pm

Great, I'm looking forward to your results!

Jens_Lee
Member
Posts: 40
Joined: Sun Nov 19, 2017 8:14 pm

Re: LDR Deck - Friday Speed Project

Post by Jens_Lee » Mon Dec 18, 2017 1:33 pm

Broke the female headers on my protodeck, and to avoid having to resolder things in the future, i made this little guy, inspired by breadboards. The right-most pins are connected, so you can patch from any of the left most headers, to any of the rows.
IMG_20171218_142350.jpg
IMG_20171218_142320.jpg
Last edited by Jens_Lee on Tue Dec 19, 2017 9:51 am, edited 1 time in total.

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

Re: LDR Deck - Friday Speed Project

Post by tobias » Tue Dec 19, 2017 8:48 am

Creative indeed :D

Jens_Lee
Member
Posts: 40
Joined: Sun Nov 19, 2017 8:14 pm

Re: LDR Deck - Friday Speed Project

Post by Jens_Lee » Tue Dec 19, 2017 11:31 am

Yes. 1 proto deck, 4 different sensors to test, creativity is applied.

Post Reply