Page 1 of 4

sharp gp2y0a21yk0f

Posted: Sun Oct 18, 2015 9:27 am
by mannaris
Hello,
want to ask if its possible to connect the crazyflie 2.0 with the sensor(sharp gp2y0a21yk0f) and what i have to do?

thank you very much!

mannaris

Re: sharp gp2y0a21yk0f

Posted: Wed Oct 21, 2015 9:40 am
by arnaud
Hi,

Yes it would be possible to interface this sensor.

You have to connect the sensor to the deck port: https://wiki.bitcraze.io/projects:crazy ... ort_pinout

It should be just power and output of the sensor to an analog input.

Then you have to create a deck driver: https://wiki.bitcraze.io/doc:crazyflie: ... mware:deck

There is an analog API, though not yet documented: https://github.com/bitcraze/crazyflie-f ... k_analog.h (it is very similar to the arduino analog api).

This should be enough to get you started, do not hesitate if you have further questions.

Re: sharp gp2y0a21yk0f

Posted: Fri Oct 30, 2015 8:35 am
by mannaris
hi,
thank you very much for your help!
I have connected the sensor to the deck port and soldered it to an analog input.
Now I have to create this deck driver, but i dont understand where i have to insert it and how i can change the firmware.
And after this the data of the sensor should be shown somewhere.
It would be great, if someone can answer these question. i am very grateful for any help!

Thanks,
mannaris

Re: sharp gp2y0a21yk0f

Posted: Fri Oct 30, 2015 9:06 am
by Che.
hi, did you already download the virtual box provided by bitcraze? you can download it on their homepage.
this is a good startingpoint, you can browse and edit the whole firmware and flash it from there. take a look on the wikipages from bitcraze.

i hope that helps you past the first days.

greets, che

Re: sharp gp2y0a21yk0f

Posted: Tue Nov 03, 2015 8:31 pm
by mannaris
hi, yes thank you for that tipp. I have downloaded it and have found the function to flash it with the crazyradio, but i cant find the place where i have to change the firmware for installing the deck driver. I want to add the driver in a way that i can add the sensor output as a parameter which i can see in the client.
"To compile the driver, place it in deck/drivers/src/ and add it to the Makefile: "
Unfortunately i am not able to find these folders.
I hope for any help and i am so grateful for all answers.
mannaris

Re: sharp gp2y0a21yk0f

Posted: Tue Nov 03, 2015 8:43 pm
by arnaud
Hi, Sounds like you did not pull the latest version of the project and moved to the "master" branch. The folders are in the latest versions.

If you want to see the sensor output it is better to use a log variable, it can be added easily for example: https://github.com/bitcraze/crazyflie-f ... zer.c#L638 then you will be able to plot the values in the client.

Re: sharp gp2y0a21yk0f

Posted: Wed Nov 18, 2015 7:56 pm
by mannaris
I cant find the source code in the virtual box.the folders arent the same as in the description. I download it two times and upgrade all services. hope its my bad and anyone can tell me what i have to do.

Re: sharp gp2y0a21yk0f

Posted: Thu Nov 19, 2015 9:31 am
by arnaud
Are you sure the git repos in the virtual machine is in the master branch?

Re: sharp gp2y0a21yk0f

Posted: Sun Nov 29, 2015 11:47 am
by anasios

Re: sharp gp2y0a21yk0f

Posted: Sun Dec 13, 2015 3:58 pm
by mannaris
First i want to say thank you to anasios for the link.

Then i want to ask 3 questions:

1. I have the crazyflie2. How is the firmware called? Is it crazyflie firmware or is it crazyflie2-nrf-firmware?
2. can I use the driver from anasios for the crazyflie2 and my sensor(analog)?
3. I dont find the place where I have to put the driver. The wiki says : "To compile the driver, place it in deck/drivers/src/ and add it to the Makefile"
But im not able to find these folders. "Hi, Sounds like you did not pull the latest version of the project and moved to the "master" branch. The folders are in the latest versions." i dont know what you mean with "the master branch".
I would be very happy, if anyone can give me a description where i have to insert this driver, because i havent any idea what to do.
https://www.youtube.com/watch?v=chWrNh73YBw can i do it in this way? i only have to know where i have to insert the code, bacause the description is for the crazyflie 1 or is it the same?

very gratefull for any help.

mannaris