Netduino home hardware projects downloads community

Jump to content

The Netduino forums have been replaced by new forums at This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.

n0rx0r's Content

There have been 3 items by n0rx0r (Search limited from 30-March 22)

By content type

See this member's

Sort by                Order  

#13152 Simple Netduino Webserver

Posted by n0rx0r on 12 May 2011 - 02:49 AM in Netduino Plus 2 (and Netduino Plus 1)

Any one know how to use jQuery to catch the response from netduino and put in a div?

#13012 Is there a simple socket tutorial for netduino plus?

Posted by n0rx0r on 09 May 2011 - 03:07 PM in Netduino Plus 2 (and Netduino Plus 1)

I got my netduino a couple weeks from now, now i really want to try the network capability from the netduino. I already worked on the webserver, which worked perfectly. I was wondering is there a good tutorial on sockets with send response? Thank You

#12998 How can I capture the response from netduino plus?

Posted by n0rx0r on 09 May 2011 - 05:00 AM in Netduino Plus 2 (and Netduino Plus 1)

I used the code here : Link
But I cannot display the response from netduino in ConsumeNetduino.html. Please help, i am really new in jQuery and Ajax.
Thank You

Here is the code from the html file:
<link rel="stylesheet" href="" type="text/css" media="all" />
<link rel="stylesheet" href="" type="text/css" media="all" />
<script src="" type="text/javascript"></script>
<script src="" type="text/javascript"></script>

	$(function() {
		$( "#button1" ).button().click(buttonOn);
		$( "#button2" ).button().click(buttonOff);

function NetRequest(cmd, param1, param2)
  urlStr = "" + cmd + "/" + param1;
  if (param2 != undefined) urlStr += "/" + param2;

            //function (result) { alert(result); alert(result.message); }
            function (result) { alert(result.message); }
  url: urlStr,
  success: function() { alert("success"); },
  complete: function(XMLHttpRequest, textStatus) { completeProc(XMLHttpRequest.responseText) },
  error: function(XMLHttpRequest, textStatus, errorThrown) { alert("Error"); },
  dataType: 'html'


function completeProc(responseText)
  alert("in completeProc: '" + responseText + "'");
  $("#response").html( responseText );

function buttonOn()
    NetRequest("led", 1, 0);

function buttonOff()
    NetRequest("led", 0, 0);

<p><button id="button1">On</button> <button id="button2">Off</button></p>
<div id="response"></div>

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.