NodeJS script to control CF with BLE

Firmware/software/electronics/mechanics
jordankid93
Beginner
Posts: 8
Joined: Sun Apr 19, 2015 5:55 am

Re: NodeJS script to control CF with BLE

Post by jordankid93 »

Also I'm not sure if you would want to be the person who publishes the npm package since this started off as your project or if I should go ahead and do that? I'm not quite sure how that who process works to be honest but would be able to find out
phil
Beginner
Posts: 15
Joined: Sat Feb 14, 2015 12:01 pm

Re: NodeJS script to control CF with BLE

Post by phil »

Hi, crazyflie-ble is a great name. I'll rename the repository likewise.
I would suggest working on it a bit further before we publish it as an npm package. There is still a lot of functionality we should add - the TOC for instance - before it is seriously functional. We can decide on who publishes it when we have added some more functions.

Also, I haven't heard from the aerogel developer yet. I mailed him a couple of days ago, but if I don't hear from him tomorrow, I'll have a close look at his code to see if we can integrate parts of it.
phil
Beginner
Posts: 15
Joined: Sat Feb 14, 2015 12:01 pm

Re: NodeJS script to control CF with BLE

Post by phil »

Hi Jordankid, I renamed the repository to 'crazyflie-ble' and shared it with you.
You can push your modifications to the master branch now.
jordankid93
Beginner
Posts: 8
Joined: Sun Apr 19, 2015 5:55 am

Re: NodeJS script to control CF with BLE

Post by jordankid93 »

Thats great. I just merged my changes into the repo.

I still want to look at the code for the python client to get a better understanding of how communication with the CF works, but if you have timed want to take a look at the changes I made and let me know if anything stands out to you I'd really appreciate it
phil
Beginner
Posts: 15
Joined: Sat Feb 14, 2015 12:01 pm

Re: NodeJS script to control CF with BLE

Post by phil »

Looks very good!
I especially like the start and stop functions.
Two remarks :
1/ when in hover mode, normally you have to send the value of 32767 every 0,5 seconds at least to keep the altitude. Anything above or under will change the target to hold. I don't see where that value is actually sent when the example script is executed. Maybe you could set the thrust to 32767 in the start function when hover == true.
2/ maybe update the package.json urls to this repository?

This weekend I'll have some time and try to see how we can incorporate the TOC and logging code of the aerogel lib.
Next up in the list we can then have a look at connecting to a controller.

Great job!
jordankid93
Beginner
Posts: 8
Joined: Sun Apr 19, 2015 5:55 am

Re: NodeJS script to control CF with BLE

Post by jordankid93 »

Oh, I had no idea that number was so specific! I saw it in your original code and thought it was just a random value you chose haha. I've gone ahead and corrected that.

I will start to look into controller integration with node as well. I imagine there has to be some modules available out in the wild
Post Reply