Page 2 of 2
Re: NodeJS script to control CF with BLE
Posted: Mon Apr 20, 2015 5:35 pm
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
Re: NodeJS script to control CF with BLE
Posted: Mon Apr 20, 2015 8:48 pm
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.
Re: NodeJS script to control CF with BLE
Posted: Tue Apr 21, 2015 7:56 am
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.
Re: NodeJS script to control CF with BLE
Posted: Tue Apr 21, 2015 3:37 pm
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
Re: NodeJS script to control CF with BLE
Posted: Tue Apr 21, 2015 4:11 pm
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!
Re: NodeJS script to control CF with BLE
Posted: Tue Apr 21, 2015 7:25 pm
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