NetduinoPlus Silverlight Server (preview) - Project Showcase - Netduino Forums
   
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

NetduinoPlus Silverlight Server (preview)


  • Please log in to reply
6 replies to this topic

#1 Mario Vernari

Mario Vernari

    Advanced Member

  • Members
  • PipPipPip
  • 1768 posts
  • LocationVenezia, Italia

Posted 28 April 2011 - 06:42 PM

Hello everybody.

This does not want to be a concrete project, but a base for your own project.
Over that, please notice this is a preview, packed in a hurry, because someone could be interested in. 
This two-solutions model was the "famous" ADC sampler with FFT, but I cut off anything was not directly involved as a base.
I will promise to refine, better commenting and write a decent tutorial for anyone would start with this model.
Feel free to suggest, improve, delete, shoot me anytime...

What the hell does this application?
  • Basically it is a web-server (the Netduino),
  • that produces data periodically (an ADC sampler reading a value every 200ms),
  • and exposes the buffer (circular, 64 cells)
  • to a web client via HTTP.

  • The client proposed is a Silverlight page
  • that polls the data every second,
  • displays the buffer read in a tabular fashion and
  • displays the same data on a cartesian chart
  • the page is self contained in the Netduino server, so that it is a stand-alone application

What do I need?
Two eggs, a pound of flour....nope, that's my wife's stuffs...
You must have a Netduino Plus, because I take advantage of the Ethernet and the SD to store the Silverlight page. I think it could be solved also for the normal Netduinos, but I need some help to know them better.
You need also a PC, where to launch you favorite browser (e.g. IE, Chrome, etc), that will be able to host the Silverlight plugin.
Finally, to display the chart, I have used the Visiblox tool, because it's very well done and it's also free for non-commercial purposes.
Of course, by using a SD, bear in mind to run to the shop and purchase any SD that fit your Netduino board.

Being an hobbist, I have used Visual C# Express for the Netduino app, and Visual Web Developer Express to compile the Silverlight page. Both are totally free.
However you may use Visual Studio as the only IDE.


I have lighted the match, then what I should burn?
The very first thing to do is to compile the Silverlight app. I don't know whether the app works as soon or not, but I'd suggest to download your own free copy of the Visiblox charts.
After that you should copy only two files into the SD. Look at the attached picture.
I have created a simple "root" folder and I have placed inside the .XAP and the starting page .HTML (I have renamed to TestPage1.HTML for brevity).
Now insert the SD in the Netduino slot: no matter whether the board is running or not. The worst case is an huge flame burning all the block around: thousands of injured, but Chris is ready with brand new Netduinos for you.

The second step is to deploy the program to the Netduino. That is a very common task and no need for comments.
NOTE: in my source I have fixed the IP for the board so that my small router could map it also. Remember to change it accordingly to your own LAN.
Plug the Ethernet cable to the board so that can communicate with the PC via TCP/IP.
Now launch the browser and type the IP address of your Netduino and remember to add "TestPage1.html" to the URL. If God is with you, then you should see the Silverlight progression spinning.

That's all.
When the page has finished loading, you should see the chart and the table together displaying the ADC data in real-time.
I really hope that could be useful...
Thank you all.

Attached Files


Biggest fault of Netduino? It runs by electricity.

#2 KodeDaemon

KodeDaemon

    Advanced Member

  • Members
  • PipPipPip
  • 63 posts

Posted 28 April 2011 - 07:43 PM

Great work Mario! Downloading this now!

#3 Michel Trahan

Michel Trahan

    Advanced Member

  • Members
  • PipPipPip
  • 155 posts

Posted 28 April 2011 - 10:59 PM

Got it Thanks !
Started with C in 1985, moved to Vb3 ... to vb6 and stopped. Now started with .Net and learning C# and VB.net and wishing VB.net was on MF !

#4 fileark

fileark

    Member

  • Members
  • PipPip
  • 12 posts
  • LocationNM

Posted 14 May 2011 - 04:35 PM

This is freekin' cool, I got it working on my HT+. I am not a super coder so had some learning to do to add the Visiblox.Charts refrence to the silverlight app and fix the webpage, spent a while figuring out where the html page was storred, and finaly some SD card drama where I first tried a 4 gig card then found my 2 gig and ended up formating fat32. All good stuff but amazingly the thing works! Neat trend all on the SD card in two files.

#5 durangoflyer

durangoflyer

    New Member

  • Members
  • Pip
  • 5 posts

Posted 10 February 2012 - 02:28 AM

Subscribed.

#6 Giuliano

Giuliano

    Advanced Member

  • Members
  • PipPipPip
  • 361 posts
  • LocationSimi Valley, CA

Posted 11 June 2012 - 04:46 PM

I am going to try this out. Nice work Mario!

#7 Giuliano

Giuliano

    Advanced Member

  • Members
  • PipPipPip
  • 361 posts
  • LocationSimi Valley, CA

Posted 12 June 2012 - 04:21 AM

Hi Mario,

I couldn't find a free copy of Visiblox on their site (if you know how to, please let me know), so I just commented out the code for the charts, so I can get it to run and voila, it is running like a charm, realy cool! The Silverlight XAP loading is kind of slow but I guess I can't expect too much network speech from the N+.

Posted Image
Posted Image

Great job!

Where you able to get it to run in the WiFly as well?




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.