Page 1 of 1

LDR Deck - Friday Speed Project

Posted: Mon Dec 11, 2017 3:02 pm
by Jens_Lee
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.

Re: LDR Deck - Friday Speed Project

Posted: Mon Dec 11, 2017 3:50 pm
by Jens_Lee
The initial mapping text.

Re: LDR Deck - Friday Speed Project

Posted: Tue Dec 12, 2017 7:47 am
by tobias
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.

Re: LDR Deck - Friday Speed Project

Posted: Tue Dec 12, 2017 11:25 am
by Jens_Lee
Thank you Tobias.

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

Re: LDR Deck - Friday Speed Project

Posted: Tue Dec 12, 2017 12:20 pm
by Jens_Lee
Maybe i should say that I'm trying to develop for the TSL2561 package.

Re: LDR Deck - Friday Speed Project

Posted: Tue Dec 12, 2017 4:35 pm
by Jens_Lee
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

Re: LDR Deck - Friday Speed Project

Posted: Wed Dec 13, 2017 9:24 pm
by tobias
Great, I'm looking forward to your results!

Re: LDR Deck - Friday Speed Project

Posted: Mon Dec 18, 2017 1:33 pm
by Jens_Lee
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

Re: LDR Deck - Friday Speed Project

Posted: Tue Dec 19, 2017 8:48 am
by tobias
Creative indeed :D

Re: LDR Deck - Friday Speed Project

Posted: Tue Dec 19, 2017 11:31 am
by Jens_Lee
Yes. 1 proto deck, 4 different sensors to test, creativity is applied.