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.