Windows 10 (phone & pc) app!
-
- Expert
- Posts: 153
- Joined: Mon Dec 28, 2015 3:23 pm
- Contact:
Windows 10 (phone & pc) app!
Hey Crazyfliers
I wrote a windows 10 UAP app for controlling the crazyflie 2.0 from a bluetooth 4.0 enabled phone or PC. It's pretty barebones and simply gets the job done for flying with no real bells and whistles on top. Also, I spend most of my time writing firmware and embedded code, so you'll notice the UI is very...basic.
In order to use this there's a pre-requisite: The current implementation of the NRF51 firmware doesn't support bonding/pairing. Windows doesn't support establishing direct connections with non-bonded devices. So, I implemented bonding/pairing in the NRF51 firmware. You can find the code here (code is in the "nrf_pairing" branch -- you'll need to build & flash it yourself):
https://github.com/theseankelly/crazyfl ... rf_pairing
And here's the app code (again, you'll need to build it yourself and your phone/pc will need to be put into developer mode to deploy. I don't have plans to deal with figuring out how to deploy the app to the windows store). Grab VS 2016 Express (free) and build/deploy from there. (Pair with the crazyflie first -- it's discoverable by default when you turn it on).
https://github.com/theseankelly/crazyfl ... uap-client
Like I said, it's enough to get the job done for flying, but is missing some big things:
- no support for OTA firmware update
- no support for changing flight settings (fixed at 80% max thrust, 30% pitch/roll, and 200deg/s yaw).
- joysticks are not configurable (left stick is thrust and yaw, right stick is pitch and roll)
- no plumbing of telemetry, voltage or signal strength
- exception handling and error reporting is nonexistent
Enjoy!
Sean
I wrote a windows 10 UAP app for controlling the crazyflie 2.0 from a bluetooth 4.0 enabled phone or PC. It's pretty barebones and simply gets the job done for flying with no real bells and whistles on top. Also, I spend most of my time writing firmware and embedded code, so you'll notice the UI is very...basic.
In order to use this there's a pre-requisite: The current implementation of the NRF51 firmware doesn't support bonding/pairing. Windows doesn't support establishing direct connections with non-bonded devices. So, I implemented bonding/pairing in the NRF51 firmware. You can find the code here (code is in the "nrf_pairing" branch -- you'll need to build & flash it yourself):
https://github.com/theseankelly/crazyfl ... rf_pairing
And here's the app code (again, you'll need to build it yourself and your phone/pc will need to be put into developer mode to deploy. I don't have plans to deal with figuring out how to deploy the app to the windows store). Grab VS 2016 Express (free) and build/deploy from there. (Pair with the crazyflie first -- it's discoverable by default when you turn it on).
https://github.com/theseankelly/crazyfl ... uap-client
Like I said, it's enough to get the job done for flying, but is missing some big things:
- no support for OTA firmware update
- no support for changing flight settings (fixed at 80% max thrust, 30% pitch/roll, and 200deg/s yaw).
- joysticks are not configurable (left stick is thrust and yaw, right stick is pitch and roll)
- no plumbing of telemetry, voltage or signal strength
- exception handling and error reporting is nonexistent
Enjoy!
Sean
http://www.thejumperwire.com
Tips, tutorials, and science about DIY electronics, drones, and embedded software.
Tips, tutorials, and science about DIY electronics, drones, and embedded software.
Re: Windows 10 (phone & pc) app!
This is awesome! Great work, we are going to test it out soon .
Re: Windows 10 (phone & pc) app!
Hi Sean,
This looks great! It is really nice to start getting BLE on PC.
I tried to compile your project but I could not manage. I had VS 2015 Community and it refuses to open the project. You talk about VS 2016 Express, but I could not find it anywhere on the internet. Is there a typo?
Thanks,
Arnaud
This looks great! It is really nice to start getting BLE on PC.
I tried to compile your project but I could not manage. I had VS 2015 Community and it refuses to open the project. You talk about VS 2016 Express, but I could not find it anywhere on the internet. Is there a typo?
Thanks,
Arnaud
-
- Expert
- Posts: 153
- Joined: Mon Dec 28, 2015 3:23 pm
- Contact:
Re: Windows 10 (phone & pc) app!
Uhh...I have no idea what I was talking about. I'm going to play the "I have a 6 month old and am not getting very much sleep" card
Yes, Visual Studio Community 2015 is exactly what you need. Visual studio express 2016 doesn't exist...
I just discovered that there were a couple files in the csproj that aren't part of source control. I've removed them from the project and pushed a commit with a fixed *.csproj. Can you try again?
If that didn't work, what errors is it throwing when you try to launch or build the *.csproj?
Some other things to try:
1) are you running on windows 10?
2) go to control panel -> add/remove programs, find VS and click 'change'. Make sure the subfeature for building windows 10 universal apps is selected. I'm away from my machine that has VS right now -- I'll take a screenshot of which packages I have installed later.
Yes, Visual Studio Community 2015 is exactly what you need. Visual studio express 2016 doesn't exist...
I just discovered that there were a couple files in the csproj that aren't part of source control. I've removed them from the project and pushed a commit with a fixed *.csproj. Can you try again?
If that didn't work, what errors is it throwing when you try to launch or build the *.csproj?
Some other things to try:
1) are you running on windows 10?
2) go to control panel -> add/remove programs, find VS and click 'change'. Make sure the subfeature for building windows 10 universal apps is selected. I'm away from my machine that has VS right now -- I'll take a screenshot of which packages I have installed later.
http://www.thejumperwire.com
Tips, tutorials, and science about DIY electronics, drones, and embedded software.
Tips, tutorials, and science about DIY electronics, drones, and embedded software.
-
- Expert
- Posts: 153
- Joined: Mon Dec 28, 2015 3:23 pm
- Contact:
Re: Windows 10 (phone & pc) app!
I also just did a clean clone of my "nrf_pairing" branch of the crazyflie2-nrf-firmware repo and it's missing a couple files needed to build. I'm a n00b at this 'git' thing. Just added them and pushed to GitHub.
http://www.thejumperwire.com
Tips, tutorials, and science about DIY electronics, drones, and embedded software.
Tips, tutorials, and science about DIY electronics, drones, and embedded software.
Re: Windows 10 (phone & pc) app!
Thanks for all your hard work on this Sean Kelly.
On the first link, under the NRF_Pairing branch, I am not seeing a CSProj file. I see it in the second download link. Maybe I am missing something on the first one?
On the first link, under the NRF_Pairing branch, I am not seeing a CSProj file. I see it in the second download link. Maybe I am missing something on the first one?
-
- Expert
- Posts: 153
- Joined: Mon Dec 28, 2015 3:23 pm
- Contact:
Re: Windows 10 (phone & pc) app!
No csproj on the first one -- that's an update to the NRF51 firmware on the crazyflie. Build using the instructions in the readme for that project and flash OTA via "make cload".
http://www.thejumperwire.com
Tips, tutorials, and science about DIY electronics, drones, and embedded software.
Tips, tutorials, and science about DIY electronics, drones, and embedded software.
Re: Windows 10 (phone & pc) app!
I have extended the UWP code by adding a Windows Phone 8.1 project that shares the communication code. The trouble I'm running into with both the W10 and the WP81 version is that the bluetooth connection is flaky at best. Also the copter cuts and and reboots usually when you initially apply thrust. It might be that my copter is broken as I'm also having trouble with the Crazyradio AP connection. viewtopic.php?f=8&t=2267
The repository with the added / slightly refactored code can be found on my github account:
https://github.com/wldevries/crazyflie2 ... uap-client
The repository with the added / slightly refactored code can be found on my github account:
https://github.com/wldevries/crazyflie2 ... uap-client
Re: Windows 10 (phone & pc) app!
As for not being able to load the projects, this could be due to missing SDKs. You need a seperate SDK for either project which you can find on the Windows SDK page: https://developer.microsoft.com/en-us/w ... dk-archive