Beginner Question and Hello!
#1
Posted 27 April 2011 - 03:04 PM
#2
Posted 28 April 2011 - 07:04 AM
I make beer.
My project goal is connect 6 thermistors to the Net+ and map the temperature profile in my mash tun throughout a mash. An app running on my PC would connect to the Net+ vis ethernet and collect that temperature data to trend/log/whatever. The main point being a learning Net+ project that provides some useful results.
That ethernet connection (sockets I guess) is where I need some patient help. I ran the webserverhello world example and that was pretty cool, but that really doesn't fit my project.
Maybe there is already an example of how to do this here, but everything I've found so far seems to be interested in http only. Maybe that will be a next step for me, but right now I'm having enough trouble fighting C# syntax... I don't need to add something else I completely don't get.
Firstly, welcome to the community.
From what I have read of your requirements there is no reason why you cannot use the web server project found here. I have written a couple of projects connecting a PC to a web server - I did it using Silverlight rather than a WinForms application but I have also seen some post which suggest that there has been some connectivity to the N+ using WinForms. You would simply need to have the WinForms application poll the web server periodically and have the web server gather the readings and send them back in response.
Another possibility (as you have some com port programming experience would be to use RS232 - you would need some additional hardware to convert the sgnals from the N+ to RS232 levels but there is hardware out there to do that for you. You could even do this with a Bluetooth module and have a wireless system. These modules just act like com ports - if the data is not commercially sensitive then they just plug and go.
Hope this helps,
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
#3
Posted 28 April 2011 - 08:35 AM
Just a little note, because it depends on your target app.
You may have two different scenario:
- your N+ is a web-server as Mark described, so that you will have a client somewhere that should connect to your board;
- your N+ is also a client, but it acts a data provider (i.e feeder) for a PC server, then a UI client should connect to that server, instead of the board.
The first is much simpler and finalized to *that* board: it is a game for two, a client and a N+.
The second is more complex, but much more powerful also. You may have several data providers (e.g. Netduinos, PCs, 3rd part devices, etc), each one provide its own data to the server. The result is somewhat aggregating data, where you may compose your own application (desktop or web) limited only by imagination.
Cheers and welcome from me too.
#4
Posted 28 April 2011 - 04:31 PM
#5
Posted 28 April 2011 - 06:17 PM
I was thinking initially that the webserver route would be more difficult for me because of my lack of experience with web apps in general.
-snip
If you guys come across any example code discussions that make that client to server ethernet connection I'd appreciate your pointing them out to me.
The web app route is not too difficult if you keep in mind what you are trying to do. I created a project a while ago to perform data logging with the results being presented in Silverlight. The data was generated by an NE555 timer but there is nothing to stop you collecting data from several analog data sources and logging that. You can find the post in the project showcase forum here and some further discussions on my blog here. Whilst this project uses Silverlight there should be no barriers to creating a WinForms application to collect the data from multiple devices on a network.
From the server point of view I think that the principles are there in the web server projects you can find in the project showcase.
On the desktop side you do not need to think of this as a web porject. It can be a standard WinForms application which consumes the data from a web server.
Hope this helps,
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
Posted 29 April 2011 - 11:43 AM
#7
Posted 29 April 2011 - 01:46 PM
Next to figure out how to hard code the Net+ IP address.
You can set the IP address on the N+ using MFDeploy.
Look for the Network item under the Target -> Configuration menu item.
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
#8
Posted 29 April 2011 - 11:10 PM
#9
Posted 30 April 2011 - 04:13 PM
I had never even seen a forum post that mentioned the MFDeploy.
It's a tool you'll need every now and then. Other situations you might need it for are unlocking a mis-behaving N+ application (you can use the tool to force the erasure of an application you've written) and upgrading firmware. I'm sure there is more but they are the main uses I've found for it.
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
#10
Posted 24 May 2011 - 02:00 PM
#11
Posted 24 May 2011 - 07:03 PM
#12
Posted 26 May 2011 - 09:23 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users