Bluetooth modules

Modules, cases, buttons...

Re: Bluetooth modules

Postby treflip » Fri Feb 20, 2015 2:02 am

I tried compiling the code in visual studio 2013 as a CPP win32 console application (and added the #include stdafx.h because of an error I was getting) but am now getting errors saying I need a ; before the . in the 'using InTheHand.net' line. I downloaded the NuGet package manager (I hope this is the correct thing to do) but was given a prompt that it was already installed.

Can you tell me how to compile this please? I have never used VS before.

Thank you!
treflip
 
Posts: 83
Joined: Fri May 30, 2014 4:50 pm
Location: Florida

Re: Bluetooth modules

Postby Myndale » Fri Feb 20, 2015 8:47 am

The project is C#, not CPP. From the menu select File ->New Project , click on "Visual C#" and choose "Console Application" and give it the name "BluetoothTest". Then paste my code into the one .cs file in the project and hit F5 to compile and run it.

Sorry that you have to jump through these hoops, I should probably wrap it up in a form that's easier for people to use but it was really just a little proof-of-concept that I wasn't taking too seriously. If you have any other problems be sure to post back here.
Myndale
 
Posts: 507
Joined: Sat Mar 01, 2014 1:25 am

Re: Bluetooth modules

Postby Myndale » Fri Feb 20, 2015 9:12 am

Oh, one more thing, like I said you need to add the 32feet library reference. Once you've created the project select Tools-> NuGet Package Manager -> Manage NuGet Packages For Solution. Type "32feet" into the "Search online" field. Two projects will appear, select and install the first one i.e. the one for Bluetooth.
Myndale
 
Posts: 507
Joined: Sat Mar 01, 2014 1:25 am

Re: Bluetooth modules

Postby Myndale » Fri Feb 20, 2015 9:42 am

Myndale
 
Posts: 507
Joined: Sat Mar 01, 2014 1:25 am

Re: Bluetooth modules

Postby treflip » Sat Feb 21, 2015 1:43 am

BT_HC05_Vol.PNG
Working HC05 changing volume level on Win 8.1
BT_HC05_Vol.PNG (92.18 KiB) Viewed 5646 times
Sweet. Thanks so much!

Here's the working pic. Volume controls is cool!
treflip
 
Posts: 83
Joined: Fri May 30, 2014 4:50 pm
Location: Florida

Re: Bluetooth modules

Postby Myndale » Sat Feb 21, 2015 3:17 am

Awesome! Glad to see its working. :)

One weird thing I did discover is that the next-track/prev-track functions only work if the app is running standalone, for some reason if you run it from the Visual Studio debugger then they get intercepted. No idea why, but it caused me a good deal of head-scratching.
Myndale
 
Posts: 507
Joined: Sat Mar 01, 2014 1:25 am

Re: Bluetooth modules

Postby treflip » Sat Feb 21, 2015 3:31 am

I haven't tried it on any songs off my hard drive. Right now I'm using Grooveshark.com and the volume controls are fast! Mute works too.

Unfortunately I don't know any C# yet. I am impressed with how cool this console app is though and downloaded VS to mess around with some vb stuff for work... plus I think C# is the preferred language for the iPhone so I'm definitely interested in putting it on my to do list!

I have run it both in debug mode and standalone ( bin/Debug/BT_Audio.exe) and it works fine in both though. Sorry I can't be of much help!
treflip
 
Posts: 83
Joined: Fri May 30, 2014 4:50 pm
Location: Florida

Previous

Return to Hardware Development

Who is online

Users browsing this forum: No registered users and 12 guests

cron