Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Netduino, iOS/Android, Bluetooth Integration, and Other Shenanigans

bluetoothiphone android mobile

  • Please log in to reply
7 replies to this topic

#1 fiddlr

fiddlr

    New Member

  • Members
  • Pip
  • 3 posts

Posted 24 April 2013 - 01:27 PM

First post, so a bit about me first. I am a .NET developer, with a background in platform agnostic mobile web apps. I have a Netduino Plus 2, along with various bits and pieces for it.

 

My goal is to have an html5/css/js app running locally on my device (iPhone/Android) that is able to send values down to the netduino. I would have to use a layer like PhoneGap (or something else, I'm open to suggestions) to talk to the hardware from the app.

 

My parts/requirements/goals are simple.

 

Parts:

  • Netduino
  • Input button
  • LED 1
  • LED 2

 

Goals

  • When I press the button, I want to light up both of the LEDs, and have them flash in an interval, specified by a variable until the button is released. When I release it, the lights go out. 
  • Update the netduino, over bluetooth, to change variable which controls the interval at which the light flashes.

The only other information I have found regarding this type of thing is here, so yes, I searched before posting 

http://forums.netdui...h-wifi-ioio-etc

 

 

So, is this possible? Am I crazy? Should I be looking elsewhere? Is a native app the only way to go?



#2 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 24 April 2013 - 10:24 PM

Hi fiddlr, This sounds very doable. So basically the web page would do asynchronous calls to the Netduino--and then the Netduino would respond to those by activating the LEDs in certain ways? Chris

#3 fiddlr

fiddlr

    New Member

  • Members
  • Pip
  • 3 posts

Posted 24 April 2013 - 10:29 PM

That would be the plan. However, wouldn't I need to have a web server running for that (the ajax call) to happen?

 

I saw this shield http://www.makershed...ld_p/mkrbl1.htm for sale. Do you have any better recommendations for a decent shield? $35 seemed a bit expensive when I see others for $15 or less, and even see chinese BT USB dongles for $5 or less shipped.



#4 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 25 April 2013 - 01:08 AM

Hi fiddlr, $35 for a Bluetooth shield probably isn't bad. Wireless is expensive to do, especially for low-volume hardware. As far as web servers go...yes, you'd need a web server. You can also use the networking feature of Netduino to serve up pages and take requests. Or you can do all of your command messaging via Bluetooth. Lots of options. Chris

#5 baxter

baxter

    Advanced Member

  • Members
  • PipPipPip
  • 415 posts

Posted 25 April 2013 - 02:21 AM

I hooked up one of the cheap serial TTL Bluetooth modules to a Netduino Plus a while back and it worked quite well. These modules just basically Bluetooth enable their host using a serial port. I used a Bluetooth serial program from the Basic4Android Forum with an Archos 80 G9 tablet to communicate with the Netduino. The project got put aside because I just couldn't bring myself to become fluent another programming language. Basic4Android is a lot like Visual Basic and is probably the easiest way to get into Android programming.

 

http://www.basic4ppc.com/index.html

 

Baxter
 



#6 fiddlr

fiddlr

    New Member

  • Members
  • Pip
  • 3 posts

Posted 25 April 2013 - 07:38 PM

Thanks for the responses.

 

I don't want to use a web server, if I had to go to that extent, I would go native. Is there any way anyone knows of to send the bluetooth commands from the javascript? As originally postulated, it would have to go through a phonegap type layer.

 

Baxter, I programmed in java back in the day, so I suppose I could go back to that. I'm really having fun using web technologies though, and would hate to get my hands dirty doing native code for iOS as well as Android.

 

do all of your command messaging via Bluetooth Chris

 

What exactly did you mean by this? What technologies on the smartphone side would be in use for this?



#7 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 29 April 2013 - 11:58 PM

Hi fiddlr,

What exactly did you mean by this? What technologies on the smartphone side would be in use for this?

Oh I was just saying that you could send all your data to/from the Netduino via Bluetooth. Choose your communication method, and then choose the protocol or mechanism you want to use to communicate between the two. Lots of ways to get data from point a to point b. Chris

#8 not4now

not4now

    Member

  • Members
  • PipPip
  • 12 posts
  • LocationSanto Domingo, Domincan Republic

Posted 30 April 2013 - 03:54 AM

Hello everyone,

 

I made a similar simple project with my N+ and N+2 with a US$5 Bluetooth module and it works just great. It's with 3 RBG LEDS but just turning a color on and off. So for your project you can make a loop checking if the button has been release or not to keep running the sequence or not (you can use multi-threading FTW too :P) modifying the code I have. (I'm not an expert) I love programming on windows phone 7 & 8 (C# + Visual Studio FTW :P) but hate android. So I found this awesome IDE (http://appinventor.mit.edu/) for android that MIT made for kids (I think) that makes it really easy and fun :). You can try using that as I did with my project. 

 

I hope that it helps you,

 

Not4Now

Attached Files







Also tagged with one or more of these keywords: bluetoothiphone, android, mobile

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.