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 Plus 2 and Communication with Windows Forms


  • Please log in to reply
15 replies to this topic

#1 zemuss

zemuss

    Advanced Member

  • Members
  • PipPipPip
  • 69 posts

Posted 06 July 2013 - 03:36 PM

Since I got the SDCard issue all worked out, and temperature now running in a debug mode, what I want to start doing is develop the communications between the Netduino Plus 2 and Windows Forms. 

 

Any help would be appreciated.

 

What is the best way to communicate? USB or Ethernet? 

 

If USB I would lose the ability to debug correct? So Ethernet is best?

 

Do I need to create a Web Server for communication?

 

 



#2 Radek

Radek

    New Member

  • Members
  • Pip
  • 5 posts

Posted 06 July 2013 - 04:56 PM

Devices Profile for Web Services (DPWS) may be what you are looking for.

 

http://msdn.microsof...y/hh423022.aspx



#3 NooM

NooM

    Advanced Member

  • Members
  • PipPipPip
  • 490 posts
  • LocationAustria

Posted 06 July 2013 - 06:46 PM

you can also do that with serial comms, wich is very nice and easy to use.

 

a tutorial:

http://blog.codeblac...with-RS232.aspx

 

edit: i use serial comms for all win-duino communication, its way more lightweight than ethernet.



#4 zemuss

zemuss

    Advanced Member

  • Members
  • PipPipPip
  • 69 posts

Posted 06 July 2013 - 06:58 PM

Ok thanks. I will check both of them out.

 

Hey NooM you were right about the 2gb limit which I hope future firmware releases open that limitation up because 2gb sdcards are scarce.



#5 Nevyn

Nevyn

    Advanced Member

  • Members
  • PipPipPip
  • 1072 posts
  • LocationNorth Yorkshire, UK

Posted 06 July 2013 - 07:26 PM

You could have a look at the Neon Mika web server in the Project Showcase forum.  The web server is already there and working, you just need to bolt on your functionality.

 

If you wanted wireless then you could also consider bluetooth.

 

Regards,

Mark


To be or not to be = 0xFF

 

Blogging about Netduino, .NET, STM8S and STM32 and generally waffling on about life

Follow @nevynuk on Twitter


#6 zemuss

zemuss

    Advanced Member

  • Members
  • PipPipPip
  • 69 posts

Posted 06 July 2013 - 09:31 PM

Cool i will take a look. WIred is fine for now. I need to get this project going because digital temp is much better than manual temp. IMO.. lol



#7 Bernie

Bernie

    Advanced Member

  • Members
  • PipPipPip
  • 40 posts

Posted 07 July 2013 - 03:03 PM

What is the best way to communicate? USB or Ethernet? 

 

What is your application? Can you tolerate the ND being tied locally to your PC? If so, then USB might be your easiest method.

 

If you want to extend the ND further away, or access it from multiple PCs on your network, then Ethernet is your solution. 

 

Tell us a few words about the application and then a better answer to your question can be given.



#8 caEstrada

caEstrada

    Advanced Member

  • Members
  • PipPipPip
  • 84 posts

Posted 07 July 2013 - 09:38 PM

Zemuss,

 

I used ethernet all the time.  It provides longer distances and probably faster speeds.  I have used

ethernet in an industrial environment with excelent results.



#9 zemuss

zemuss

    Advanced Member

  • Members
  • PipPipPip
  • 69 posts

Posted 07 July 2013 - 10:38 PM

I am building a aquarium controller and I would like to accomplish the following:

 

1. Create a Windows Application to interface with the netduino. This is my first priority.

2. Build a website which can publish my aquarium data over the web, but I will publish the data so i can get the values any time of the day.

 

I would like to implement one solution to cover both Web and Local applications. 

 

Short term goal will be Temperature and my long term goal includes LED Lights, Power control (On / Off) and PH sensor. 

 

Thanks for any suggestions.



#10 jrlyman3

jrlyman3

    Advanced Member

  • Members
  • PipPipPip
  • 67 posts
  • LocationNorth St Paul. MN

Posted 08 July 2013 - 02:26 AM

Ethernet is a great way to go, once it's working you can upgrade to wireless (WiFi) without much change.

That's what I'm planning to with a number of my projects.

 

You could setup a web server on the NP2 for remote access to take care of both 1 & 2, and hook up an

LCD for a local display.

 

I'd put web page "templates" on the SD card.  Read the template, fill in the  data, and then send it out.

This makes it easy to update the web pages "look and feel".



#11 iced98lx

iced98lx

    Advanced Member

  • Members
  • PipPipPip
  • 134 posts
  • LocationSouth Dakota

Posted 09 July 2013 - 03:26 PM

I am building a aquarium controller and I would like to accomplish the following:

 

1. Create a Windows Application to interface with the netduino. This is my first priority.

2. Build a website which can publish my aquarium data over the web, but I will publish the data so i can get the values any time of the day.

 

I would like to implement one solution to cover both Web and Local applications. 

 

Short term goal will be Temperature and my long term goal includes LED Lights, Power control (On / Off) and PH sensor. 

 

Thanks for any suggestions.

 

I am working on the same project (you can see my project in general discussion) on the N+2 and I chose to implement a webserver that served up XML and took in commands. I then used an intermediate webserver (www.reefin.net) to read the XML and parse it. The controller stats on reefin.net are pulled in real time from my N+2. The webserver can (and will in my case) be extended to offer control over the controller as well. I'll be writing a windows application to monitor and control it as well (and releasing source, of course) so you can follow along as you take off on your own  project. I looked at WCF, DPWS, and a few other options. 

 

Why did I end up with a webserver on the N+2 when I specifically started out looking to NOT have one?

 

This one is very light weight, I didn't go with Neon's because I didn't need everything they've built into that.

 

I'm not bothering with rendering pages, just XML that is parsed by other devices.

 

It easily enables two way communication just by sending a request to the webserver.

 

Enables me to grab stats from another webserver and do all my logging and what not off the N+2

 

 

Hope that helps!



#12 Jeffa

Jeffa

    Member

  • Members
  • PipPip
  • 14 posts
  • LocationCurrently Los Angeles

Posted 10 July 2013 - 10:56 PM

I published some .netmf source to read temperature from an LM34temperature sensor and serve it up as XML. It also sets the time from an NTPserver. I mapped a path through my router so I can read the temperature served from home while on the road. Some project resources are available at http://homeamation.azurewebsites.net/ I have some mocked up data on that same Azure site which allowed me to publish the app without my home network data logger exposed to the general public. XML example:  http://homeamation.a...TemperatureData

 

FWIW I also wrote a Microsoft Windows 8 and Windows Phone 8 app to consume this XML as well as some JSON which I published in the respective MS stores. I also published the application sourceon gitHub.I wrote it with MVVMLightToolKit and a shared Portable Class Library View Model.

 

I'm off to check out @iced98lx project as I happened by this thread wondering how I want to deal with some biDirectional data over Bluetooth.

 

c ya... - jeffa aka @jhalbrecht


---
KF7CRU @jhalbrecht
Work: www.iea-software.com
Tmi: www.rodaw.com, tumblr.rodaw.com

#13 iced98lx

iced98lx

    Advanced Member

  • Members
  • PipPipPip
  • 134 posts
  • LocationSouth Dakota

Posted 11 July 2013 - 04:03 PM

Jeffa- I haven't yet uploaded the source that takes in and parses commands but I'm nearly done so I'll add that shortly. How far distance from the board are you running your LM34's?  They might just fill a need for me!!



#14 Jeffa

Jeffa

    Member

  • Members
  • PipPip
  • 14 posts
  • LocationCurrently Los Angeles

Posted 12 July 2013 - 12:09 PM

On that specific project it was right on a prototyping shield. However in another project using Phidgets(before I discovered NerdKits, arduino and netduino etc.) I ran one ~ six feet from the controller using some cat5 wire I had handy. The LM34 data sheet has some notes about length of the wire and some additional discreet component circuits. My application worked fine with the sensor soldered to the end of the wire. 

 

Check out this article: "The Long Arm of the Nerdkit" This guy went thirty feet. 

 

I've got a Dallas DS18B20  programmable resolution 1-wire digital thermometer sensor sitting on my bench just itching to be experimented on. Multiple addressable sensors on the same wire. This device does not suffer from analog noise interference as the LM34 may experience. I believe fifty meters wire length is not unheard of with the DS18B20. (see this discussion)

 

c ya.. - jeffa


---
KF7CRU @jhalbrecht
Work: www.iea-software.com
Tmi: www.rodaw.com, tumblr.rodaw.com

#15 iced98lx

iced98lx

    Advanced Member

  • Members
  • PipPipPip
  • 134 posts
  • LocationSouth Dakota

Posted 12 July 2013 - 09:16 PM

On that specific project it was right on a prototyping shield. However in another project using Phidgets (before I discovered NerdKits, arduino and netduino etc.) I ran one ~ six feet from the controller using some cat5 wire I had handy. The LM34 data sheet has some notes about length of the wire and some additional discreet component circuits. My application worked fine with the sensor soldered to the end of the wire. 

 

Check out this article: "The Long Arm of the Nerdkit" This guy went thirty feet. 

 

I've got a Dallas DS18B20  programmable resolution 1-wire digital thermometer sensor sitting on my bench just itching to be experimented on. Multiple addressable sensors on the same wire. This device does not suffer from analog noise interference as the LM34 may experience. I believe fifty meters wire length is not unheard of with the DS18B20. (see this discussion)

 

c ya.. - jeffa

 

I've got a few of the DS18B20's here, I haven't tested cable length yet, though.



#16 zemuss

zemuss

    Advanced Member

  • Members
  • PipPipPip
  • 69 posts

Posted 15 July 2013 - 12:46 PM

I have the DS18B20 currently working with a wire length of 10 feet. It is the first sensor i have up and running. 






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.