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

Suggestions, guidance,help


  • Please log in to reply
12 replies to this topic

#1 Frank

Frank

    Advanced Member

  • Members
  • PipPipPip
  • 62 posts
  • LocationNorth Waterboro Maine

Posted 01 January 2011 - 04:58 PM

I just can't wrap my head around this one: I'm running the PHAnderson interface to a N+. Have also run it on a mini and a Netduino.\ And they work fine. If I was happy watching the output window of VS Exp print a value, I would have nothing but smiles. Debug.Print("A"+Tf.ToString() + "F"); I have the N+. I also have a simple website up on discountasp.net. Nothing fancy, some links and a couple of pictures. http://www.waterboro.com. Couldn't get much simpler, VS Web Express. I am putting a textbox on the website, called cellartemp1. Pretty easy to see where I'm going, or trying to go. I'm out of my league on this. It cannot be rocket science to put a single short string into a textbox. It ain't old age, nor Alzheimer's, I just do not understand either side;getting the N+ to send to that url, nor recogonizing it and putting it into the box at the site end. http://www.waterboro.com/Axxxxxxxx is what I want to send, I think. Basically a prefix letter and 8-12 digits, all in one string. Some guidance, suggestions, would be very welcome. :)
Retired -stone sculptor -macro photographer- novice but avid Go player - Geek

#2 Chris Seto

Chris Seto

    Advanced Member

  • Members
  • PipPipPip
  • 405 posts

Posted 01 January 2011 - 06:26 PM

Not so sure I understand your issue...? Can you explain it as simply as possible exactly what you are trying to do? :)

#3 Jim Davies

Jim Davies

    Advanced Member

  • Members
  • PipPipPip
  • 48 posts
  • LocationBrighton & Hove, UK

Posted 01 January 2011 - 06:48 PM

Happy New Netduino Year, Frank! You may find that you need a server on the web site, storing values in a file or database. You would ideally do an HTTP POST to the site with your new value(s), a process running there would store away the value(s), and visitors can then view present and/or past values on web pages setup for that purpose (which retrieve the value(s) from file or database). It's not quite as simple as you were imagining - however there are one or two sites that might make it easier, e.g. www.pachube.com, if you haven't come across it? Best, Jim

#4 Frank

Frank

    Advanced Member

  • Members
  • PipPipPip
  • 62 posts
  • LocationNorth Waterboro Maine

Posted 01 January 2011 - 07:18 PM

Geesh, my manners !! Happy New Year to all ! Jim, I've looked at , and contemplated Pachube. It's a far more elegant, and secure, approach to what I want to do, but hey, I've got a website, and I like to mess around with it ! Chris.S It's the mechanics that are killing me right now, I think. This has got to be a common issue many Netduino owners will want to do, especially the N+ people. It's just I think my old fart mind is really muddying up the water ! Basics: I have an Netduino Plus. I can copy and play with the code to make the PHAnderson chip work, and it displays on the PC screen, inside of Visual Studio Express, using debug.Print..... I have a website, like I'm sure many of us do, up on discountasp.net. Nothing but some links, and some pictures. I play there, and it keeps me happy in retirement! I have a textbox on the website screen. Currently displaying time, but hey, I'm playing. I want to have the N+ send the short string of data I have from the DS18B20 via the PHAnderson chip to the website, and display it in that textbox, or really any textbox. I don't understand the mechanics. If the N+ sends http://www.waterboro.com/A650000 , or whatever url format would be more correct, I don't understand how to make that a value that is put into a location on the website that will be presented when the page is looked at. It's that 'process' that recognizes attached data on the url that I just don't understand. To me it's like the "Hello World", and blinky LED examples. Can't this be a blackbox, that the rank beginners can use, and then grow from there? Look at the number of folks doing DS18B20 and other temp ICs. I have to believe many also have a website of some sort. Putting temp,or some value, on a debug screen is ok, putting it on a local LCD screen is ok, but why not where it can be seen from anywhere? Yep, and you should know I have two thermocouples buried near the well, one outside, one in the cellar, one near the pellet stove, etc. That Anderson IC lets me do 7 sensors !!Now if I can just convince the wife to give me more of the SS check each month ........LOL.

Edited by Frank, 01 January 2011 - 09:34 PM.

Retired -stone sculptor -macro photographer- novice but avid Go player - Geek

#5 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 01 January 2011 - 08:12 PM

Hi Frank, If you're using ASP.NET on the website, here's an easy way to get started: Simple: GET method 1. Pass the data to your website as part of the URL. Just add a question mark followed by the data. - For instance, http://www.waterboro...px?datagoeshere - Make sure that you don't put any spaces or non-alpha characters in the data (you can "URL encode" them if needed) 2. In your ASP.NET webpage, read the data via the Request.QueryString function. And then save the data as a local Session variable. - <% Session("data") = Request.QueryString(); %> 3. In your ASP.NET webpage, put the stored text inside the textbox. - <%=Session("data")%> This is off the top of my head, but it should work... Chris

#6 Frank

Frank

    Advanced Member

  • Members
  • PipPipPip
  • 62 posts
  • LocationNorth Waterboro Maine

Posted 01 January 2011 - 09:29 PM

Thanks Chris. It always makes life easier to know the right words to use !!! LOL Google and I have already found some neat examples too.
Retired -stone sculptor -macro photographer- novice but avid Go player - Geek

#7 Frank

Frank

    Advanced Member

  • Members
  • PipPipPip
  • 62 posts
  • LocationNorth Waterboro Maine

Posted 01 January 2011 - 09:53 PM

And SUCCESS !!! Added this to my default.aspx.cs page: System.Collections.Specialized.NameValueCollection newdata = Request.QueryString; ct1.Text = newdata.ToString(); I suspect this is just enough rope to hang myself ! LOL
Retired -stone sculptor -macro photographer- novice but avid Go player - Geek

#8 Jim Davies

Jim Davies

    Advanced Member

  • Members
  • PipPipPip
  • 48 posts
  • LocationBrighton & Hove, UK

Posted 02 January 2011 - 04:08 PM

Hi Frank, I guess you could also implement a web server in your N+ using an HttpListener, and then use an HTML <iframe> on your main web site to show the value(s). Jim

#9 Frank

Frank

    Advanced Member

  • Members
  • PipPipPip
  • 62 posts
  • LocationNorth Waterboro Maine

Posted 02 January 2011 - 04:32 PM

Hi Frank,

I guess you could also implement a web server in your N+ using an HttpListener, and then use an HTML <iframe> on your main web site to show the value(s).

Jim


Learning the words .. so , in effect, I would be pushing the data to my website ?

I'm sitting here wondering about stuff I didn't know existed a day ago, or didn't ever worry about ! LOL

There are so many ways to accomplish putting the data on the webite. And I really want to keep this a blackbox approach.
I guess first I need to think through where I want the data to reside, stay, come from, when someone uses that website.

I cant believe how good it felt using those two lines to see the data on the website! And then realizing it disappeared the next refresh if I didn't add the data in the URL. Geesh, I'm having too much fun. And, I get to babysit two Grandsons today besides, while another one is being delivered !
Retired -stone sculptor -macro photographer- novice but avid Go player - Geek

#10 Nevyn

Nevyn

    Advanced Member

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

Posted 03 January 2011 - 07:34 AM

I cant believe how good it felt using those two lines to see the data on the website! And then realizing it disappeared the next refresh if I didn't add the data in the URL.


Adding the value to the session as will help with this (except if the page is loaded for the first time with no data in the query string). By using the session you could keep the previous value (assuming session is still valid - 20 minutes by default) and display that if there was no data in the query string.

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


#11 Jim Davies

Jim Davies

    Advanced Member

  • Members
  • PipPipPip
  • 48 posts
  • LocationBrighton & Hove, UK

Posted 03 January 2011 - 09:49 AM

Mark - But maybe Frank wants other people to see the value - so different Sessions? Frank - How's GS #3 ?? Jim

#12 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 03 January 2011 - 09:54 AM

Mark - But maybe Frank wants other people to see the value - so different Sessions?


Good point there too. There's always the "Application" collections for sharing data across user sessions...

Chris

#13 Nevyn

Nevyn

    Advanced Member

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

Posted 03 January 2011 - 10:44 AM

But maybe Frank wants other people to see the value - so different Sessions?

Good point, the Netduino will have one session and the viewer (PC user) will have a totally different session.

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





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.