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

NeonMika.Webserver

webserver web server neonmika internet web server http sd xml json

  • Please log in to reply
213 replies to this topic

#61 gnomathibus

gnomathibus

    Member

  • Members
  • PipPip
  • 13 posts
  • LocationFrance

Posted 29 April 2012 - 08:40 PM

Here is a screenshot of the error in debug mode step by step, if I use the NET MF 4.2, it can be is the problem? see you soon and thank you again

Attached Files



#62 NeonMika / Markus VV.

NeonMika / Markus VV.

    Advanced Member

  • Members
  • PipPipPip
  • 209 posts
  • LocationUpper Austria

Posted 03 May 2012 - 03:10 PM

I cannot reproduce your problem with 4.1, so I think it's a problem with 4.2...
A screenshot of step-through with F11 one step BEFORE jumping to Dispose() would be great...


Greets, Markus

NeonMika.Webserver
> Control your N+ and write webservice methods easyily
> Receive data from you N+ (in XML or JSON)
> Browse the SD on your N+ directly in the browser and d
own - and upload files

 

If you need help with NeonMika.Webserver, please just leave a note in the thread and/or contact me via Skype :)

 

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- Mistakes teach you important lessons. Every time you make one, you are one step closer to your goal. ----
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------


#63 gnomathibus

gnomathibus

    Member

  • Members
  • PipPip
  • 13 posts
  • LocationFrance

Posted 03 May 2012 - 08:20 PM

hello, here is the screenshot just: one step BEFORE jumping to Dispose () ;)

Attached Files



#64 gnomathibus

gnomathibus

    Member

  • Members
  • PipPip
  • 13 posts
  • LocationFrance

Posted 10 May 2012 - 08:55 AM

hello Markus, not new to the problem with the xml along with mf Net 4.2? see you soon Gnomathibus,

#65 NeonMika / Markus VV.

NeonMika / Markus VV.

    Advanced Member

  • Members
  • PipPipPip
  • 209 posts
  • LocationUpper Austria

Posted 12 May 2012 - 11:45 AM

Hey,
I'm working on some more points like file uploading via POST and stuff, but I'm @ home very few.

I have no exact idea why it is working on my 4.1, but you could try the following XMLPair code:


public class XMLPair
    {
        private string _key;
        private object _value;
        private Hashtable _attributes;

        public string Key { get { return _key; } set { _key = value; } }
        public object Value { get { return _value; } set { _value = value; } }
        public Hashtable Attributes { get { return _attributes; } set { _attributes = value; } }

        public XMLPair(string Key, object Value)
        {
            this.Key = Key;
            this.Value = Value;
            this.Attributes = new Hashtable();
        }

        public XMLPair(string Key)
        {
            this.Key = Key;
            this.Value = null;
            this.Attributes = new Hashtable();
        }

        public override string ToString()
        {
            return XMLConverter.ConvertXMLPairToXMLString(this);
        }        
    }

I removed the "inline property" (or however it is called) and changed it to the "old fashioned way of declaring properties"... Probably it works now :P

As soon as i have tested through my new version, i will upload it.

Greets, Markus

NeonMika.Webserver
> Control your N+ and write webservice methods easyily
> Receive data from you N+ (in XML or JSON)
> Browse the SD on your N+ directly in the browser and d
own - and upload files

 

If you need help with NeonMika.Webserver, please just leave a note in the thread and/or contact me via Skype :)

 

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- Mistakes teach you important lessons. Every time you make one, you are one step closer to your goal. ----
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------


#66 dudeman420

dudeman420

    New Member

  • Members
  • Pip
  • 2 posts

Posted 11 July 2012 - 11:14 PM

hey i just wanted to say thank you and that i will try to input what i can this is a highly versatile code because of the way everything is open ended it can be repurposed to nearly any need aditional functionality could be added using a pc side program to parse and display groups of data in a scripted manner beyond the capabilities of nd+ i thank you for your contribution and look foreward to future versions / updates

#67 Victor M.

Victor M.

    Advanced Member

  • Members
  • PipPipPip
  • 39 posts
  • LocationRio de Janeiro, Brazil

Posted 05 August 2012 - 01:57 AM

Hello Markus,
I have many questions about NeonMika.Weserver. A few weeks ago I get started to make a webserver, and find a lot of information but everything are so superficial and isolated ... but , then, I find NeonMika e every thing start to work! Let me congratulate you on your nice job!!!
According I stared, I have questions about. First time I try to put a fix IP but I don't find someway to do and a made a little modification in Server() to force to set the network configuration. I would like to know if it's a correct way or has an other solution without modifications?

/// <summary>
    	/// Creates an instance running in a seperate thread
    	/// </summary>
    	/// <param name="ledPort">OutputPort to indentify</param>
    	/// <param name="portNumber">The port to listen</param>
    	/// <param name="DhcpEnable"></param>
    	/// <param name="ipAddress">IP</param>
    	/// <param name="subnetMask">Mask</param>
    	/// <param name="gatewayAddress">GateWay</param>
    	public Server(OutputPort ledPort, int portNumber = 80, bool DhcpEnable = false,
                  	string ipAddress = "", string subnetMask = "", string gatewayAddress = "")
    	{
        	var interf = NetworkInterface.GetAllNetworkInterfaces()[0];

        	if (DhcpEnable)
        	{
            	interf.EnableDhcp();
            	interf.RenewDhcpLease();
        	}
        	else
        	{
            	//New to fix 
            	interf.EnableStaticIP(ipAddress, subnetMask , gatewayAddress );

        	}


PS: Sorry my bad English!

#68 Coyttl

Coyttl

    Advanced Member

  • Members
  • PipPipPip
  • 61 posts
  • LocationSilver Spring, MD, USA

Posted 08 August 2012 - 04:20 PM

Hey Markus -
Playig with the server, like it so far!

Ran into an issue, not sure if it's my network or something in code, but when trying to request an analogue pin, I get a null reference:
/// <summary>
        /// Sets up the request
        /// </summary>
        /// <param name="data">Input from network</param>
        private void ProcessRequest(char[] data)
        {
            string content = new string(data);
            string htmlHeader1stLine = content.Substring(0, content.IndexOf('\n'));
In my case, char[] data is coming in as char[0], so content is null. When this happens, I get an error page on browser. After one or more retries on the browser, I'll get a data[] with actual data.

It's getting out of the do..while loop:
do
                        {
                            newAvBytes = clientSocket.Available - availableBytes;

                            if (newAvBytes == 0)
                                break;

                            availableBytes += newAvBytes;
                            newAvBytes = 0;
                            Thread.Sleep(1);
                        } while (true);
With 'availableBytes' being 0, so nothing loads from the server in these two lines:
byte[] buffer = new byte[availableBytes];
                            int readByteCount = clientSocket.Receive(buffer, availableBytes, SocketFlags.None);
..because clientSocket.Available == 0 the first time around, so 'newAvBytes' is 0 as well as availableBytes being 0.

#69 Coyttl

Coyttl

    Advanced Member

  • Members
  • PipPipPip
  • 61 posts
  • LocationSilver Spring, MD, USA

Posted 08 August 2012 - 04:24 PM

Also, confused by the
private void ResponseListXML(RequestReceivedEventArgs e, Hashtable h)
function.. in it, you're trying to add multiple values with 'methodURL' as the key. Hashtables cannot have identical keys, so it's throwing an 'System.ArgumentException' (of "Key Exists") on the second loop of .Keys.

#70 Victor M.

Victor M.

    Advanced Member

  • Members
  • PipPipPip
  • 39 posts
  • LocationRio de Janeiro, Brazil

Posted 11 August 2012 - 02:29 PM

I trying to put some webpages in microSD card and load it, but I'm have problems with load images, the Netduino Plus show the page but doesn't load the images. What I'm doing wrong?? Victor

Attached Files



#71 Victor M.

Victor M.

    Advanced Member

  • Members
  • PipPipPip
  • 39 posts
  • LocationRio de Janeiro, Brazil

Posted 12 August 2012 - 02:12 PM

Hello,
I make in this week a few modification in NeonMika.Webserver to make a login page request first and I would like to share my modifications. Now, when you create a server in Program.cs you can put a Username and Password to protect the page access.

I try to implement the POST method to send the login request without cryptography password :(. But it's work...


EDITED LAST ON 15.3.2012


NeonMika.Webserver

__________________________________________________________________________

Download & Documentation:

http://neonmikawebserver.codeplex.com/

__________________________________________________________________________

Inroducing:
Hey guys,

NeonMika.Webserver is easy to set up and easy to extend. With minimal (to no) code you can achieve great results controlling and accessing your Netduino+.

__________________________________________________________________________

Possibities:
Controll your Netduino or Query your Netduinos status:
You can use this completely without SD card

Typical web server for html-files:
Leave your NeonMika.Webserver completly untouched and just store html-files on your SD card.

Access files over the network:
Just store every kind of other files on your SD card. You can download files from your Netduino the same way as you download files from the web.

Or everything together!
EVERTHING IS POSSIBLE! --> I should study marketing :D

__________________________________________________________________________

Structure:
The basic steps the server runs through are not that complicated at all:
Request receiving -> Request wrapping -> Response action -> Response generation -> Response sending

Responses:

XML Responses
JSON Responses
File Response
Complex Response



The server methods handles everything for you, except the Action.
Why? Not every project is the same. Everyone has other needs.
So thats why there are different types of responses you can use to expand your server.

But don't worry about much work.
In the latest version of NeonMika.Webserver I've alread included the following
Standard response actions:


XML:


echo
> [ipnetduino]/echo?value=[a-Z]
switchDigitalPin
> [ipnetduino]/switchDigitalPin?pin=[0-13]
setDigitalPin
> [ipnetduino]/setDigitalPin?pin=[0-13]&state=[true|false]
pwm
> [ipnetduino]/pwm?pin=[5|6|9|10]&period=[int]&duration=[int]
xmlResponselist
> [ipnetduino]/xmlResponselist
getAnalogPinValue
> [ipnetduino]/getAnalogPinValue?pin=[0-5]
getDigitalPinState
> [ipnetduino]/getDigitalPinState?pin=[0-13]
multipleXML
>[ipnetduino]/multixml

JSON:
jsonResponselist
> [ipnetduino]/jsonResponselist

Complex:
IndexPage
> [ipnetduino]/

FileResponse:
> [ipnetduino]/\SD\[filepath]
__________________________________________________________________________


Documentation:
I try to keep this project easy to understand (I hope so) and very extendable.
I'm trying to comment most of the methods and to keep the wiki (http://neonmikawebse...m/documentation) up to date. Please go there to have a little "Getting started"

__________________________________________________________________________

Useage:
There are two directories of interest for you:
Framework and Executeable.

Framework contains the basic code for a new project based on NeonMika.Webserver. Check out this folder if you want an untouched version of NeonMika.Webserver).
Executeable will contain little projects created by me that base on NeonMika.Webserver. Check out this folder if you want to see some examples of how to use NeonMika.Webserver

To test NeonMika.Webserver and to have some sample code, just follow these steps:
1. Just download the code and go to "Executeables"
2. Deploy the project to your Netduino Plus. It should start running.
2.1 This sample project using NeonMika.Webserver has the following xml method added to the webserver at runtime: [ipnetduino]/wave ... Connect LEDs to Pin 0,1,4,5,8,9 and you will see your LED lighting up one after the other

__________________________________________________________________________

To do:

- Return file list from directory
- Authentification for different areas on the SD (which user is allowed to go where)
- Screenshots
- Videos
- Index page refactor / Control center (29.11.11)
- Suggestions!? :)

__________________________________________________________________________

Added:

- Index page (8.11.2011)
- Screenshot of echo, switchPin and index page (8.11.2011)
- JSON support (30.11.11)
- PWM (30.11.11)
- getAnalogPinValue and getDigitalPinState (30.11.2011)
- Examples (30.11.2011)
- FileResponse improved (15.3.2012)
- Changed index page (15.3.2012)
- Nested XML support (28.4.2012)
- Example method for nested XML -> see MultipeXML(28.4.2012)
- Code cleanup (28.4.2012)

__________________________________________________________________________

Other things to mention:

- I will keep this post up to date and will mention it if there were some code or documentation changes you could profit from :)
- I appreciate every kind of response. I want this to help the community, so I hope the communty will help me to get this project better and better :)
- http://neonmikawebserver.codeplex.com/

__________________________________________________________________________

Examples

XML response:

private void Echo(RequestReceivedEventArgs e, Hashtable results)
{
  if (e.Request.GetArguments.Contains("value") == true)
    results.Add("Echo", e.Request.GetArguments["value"]);
  else
    results.Add("ERROR", "No 'value'-parameter transmitted to server");
}

JSON response:
private void ResponseListJSON(RequestReceivedEventArgs e, JsonArray j)
{
  JsonObject o;
  foreach (Object k in _Responses.Keys)
  {
    o = new JsonObject();
    o.Add("methodURL", k);
    o.Add("methodName", ((Response)_Responses[k]).Name);
    j.Add(o);
  }
}

Server setup:
Server WebServer = new Server(PinManagement.OnboardLED, 50000);
WebServer.AddResponse(new XMLResponse("echo", new XMLResponseMethod(Echo)));
WebServer.AddResponse(new JSONResponse("jsonResponselist", new JSONResponseMethod(ResponseListJSON)));

Example access:
http://192.168.0.2/echo?value=markus
http://192.168.0.2/jsonResponslist
http://192.168.0.2/\SD\folder\file.txt

__________________________________________________________________________

Greets, Markus :)

__________________________________________________________________________

Attached Files



#72 oktane

oktane

    New Member

  • Members
  • Pip
  • 1 posts

Posted 18 November 2012 - 06:55 AM

Hint for those converting this 4.1 project to 4.2:

See the changes below, where "SecretLabs.NETMF.Hardware." has been added in front of PWM and AnalogInput references. Also add those two SecretLabs references. (Hardware.PWM and Hardware.AnalogInput) This is needed because SPOT now has their own built in ones, and the OP's code does not use them, as they did not exist in 4.1.

Cheers


//Output ports with PWM functionallity
        static private SecretLabs.NETMF.Hardware.PWM PWM5 = new SecretLabs.NETMF.Hardware.PWM(Pins.GPIO_PIN_D5);
        static private SecretLabs.NETMF.Hardware.PWM PWM6 = new SecretLabs.NETMF.Hardware.PWM(Pins.GPIO_PIN_D6);
        static private SecretLabs.NETMF.Hardware.PWM PWM9 = new SecretLabs.NETMF.Hardware.PWM(Pins.GPIO_PIN_D9);
        static private SecretLabs.NETMF.Hardware.PWM PWM10 = new SecretLabs.NETMF.Hardware.PWM(Pins.GPIO_PIN_D10);       

        //Analog inputs
        static private SecretLabs.NETMF.Hardware.AnalogInput Analog0 = new SecretLabs.NETMF.Hardware.AnalogInput(Pins.GPIO_PIN_A0);
        static private SecretLabs.NETMF.Hardware.AnalogInput Analog1 = new SecretLabs.NETMF.Hardware.AnalogInput(Pins.GPIO_PIN_A1);
        static private SecretLabs.NETMF.Hardware.AnalogInput Analog2 = new SecretLabs.NETMF.Hardware.AnalogInput(Pins.GPIO_PIN_A2);
        static private SecretLabs.NETMF.Hardware.AnalogInput Analog3 = new SecretLabs.NETMF.Hardware.AnalogInput(Pins.GPIO_PIN_A3);
        static private SecretLabs.NETMF.Hardware.AnalogInput Analog4 = new SecretLabs.NETMF.Hardware.AnalogInput(Pins.GPIO_PIN_A4);
        static private SecretLabs.NETMF.Hardware.AnalogInput Analog5 = new SecretLabs.NETMF.Hardware.AnalogInput(Pins.GPIO_PIN_A5);

        static private OutputPort[] Digitals = new OutputPort[] { Digital0, Digital1, Digital2, Digital3, Digital4, null, null, Digital7, Digital8, null, null, Digital11, Digital12, Digital13 };
        static private SecretLabs.NETMF.Hardware.AnalogInput[] Analogs = new SecretLabs.NETMF.Hardware.AnalogInput[] { Analog0, Analog1, Analog2, Analog3, Analog4, Analog5 };
        static private PWM[] PWMs = new PWM[] { PWM5, PWM6, PWM9, PWM10 };
        static private bool[] PWM_On = new bool[] { false, false, false, false };


#73 NeonMika / Markus VV.

NeonMika / Markus VV.

    Advanced Member

  • Members
  • PipPipPip
  • 209 posts
  • LocationUpper Austria

Posted 20 November 2012 - 03:41 PM

Oh my god, I let my Netduino by side for too Long. I was working on the code in the summer and never submitted a new version. I started to study and so I let things behind me. But I want this to change :) I think I have to sit down the next days, update to 4.2 and to document to code a little better. When I'm done in the next days you will hear from me again (this time really ;) ) and I hope it will help you develop your networking projects :) Sorry for the long abstinence! Greets, Markus :)

NeonMika.Webserver
> Control your N+ and write webservice methods easyily
> Receive data from you N+ (in XML or JSON)
> Browse the SD on your N+ directly in the browser and d
own - and upload files

 

If you need help with NeonMika.Webserver, please just leave a note in the thread and/or contact me via Skype :)

 

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- Mistakes teach you important lessons. Every time you make one, you are one step closer to your goal. ----
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------


#74 NeonMika / Markus VV.

NeonMika / Markus VV.

    Advanced Member

  • Members
  • PipPipPip
  • 209 posts
  • LocationUpper Austria

Posted 22 November 2012 - 04:21 PM

Hello community out there! It's done, the new version is up. With this update, the following new things did come: - POST working! Have a look at the Upload method in Server.cs to learn how to work with POST - File upload - Better XML. I now implemented the classes XMLList and XMLPair. Use these if the "normal hashtable-style" doesn't work out for you. - Choosing between DHCP and fixed IP. I changed the Server's constructor, so you can now set a fixed IP from code - Return filelist from directory. I'm very proud of this. Probably it reminds you a little bit of Apaches directory view. Now you can browse your Netduino directly in your browser!! :) I hope you enjoy the new update! Let me know if you encounter any problems / bugs. or have wishes how to make things better! Greets, Markus!

NeonMika.Webserver
> Control your N+ and write webservice methods easyily
> Receive data from you N+ (in XML or JSON)
> Browse the SD on your N+ directly in the browser and d
own - and upload files

 

If you need help with NeonMika.Webserver, please just leave a note in the thread and/or contact me via Skype :)

 

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- Mistakes teach you important lessons. Every time you make one, you are one step closer to your goal. ----
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------


#75 carb

carb

    Advanced Member

  • Members
  • PipPipPip
  • 352 posts
  • LocationCrystal River, Florida

Posted 22 November 2012 - 05:11 PM

Markus, Looks great, I will give it a try once I get the NP2 updated. Thanks, Chuck

#76 NeonMika / Markus VV.

NeonMika / Markus VV.

    Advanced Member

  • Members
  • PipPipPip
  • 209 posts
  • LocationUpper Austria

Posted 22 November 2012 - 05:21 PM

Yeah, would be great to hear some response from a N+2 user, only have the first version :) Greets, Markus

NeonMika.Webserver
> Control your N+ and write webservice methods easyily
> Receive data from you N+ (in XML or JSON)
> Browse the SD on your N+ directly in the browser and d
own - and upload files

 

If you need help with NeonMika.Webserver, please just leave a note in the thread and/or contact me via Skype :)

 

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- Mistakes teach you important lessons. Every time you make one, you are one step closer to your goal. ----
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------


#77 JerseyTechGuy

JerseyTechGuy

    Advanced Member

  • Members
  • PipPipPip
  • 870 posts

Posted 23 November 2012 - 03:01 AM

I'll download it and update my ND+2 tomorrow. Thank for your contribution Markus. The server is working great on ND+2. Can't wait to try the file list.

#78 NeonMika / Markus VV.

NeonMika / Markus VV.

    Advanced Member

  • Members
  • PipPipPip
  • 209 posts
  • LocationUpper Austria

Posted 23 November 2012 - 08:02 AM

I'll download it and update my ND+2 tomorrow. Thank for your contribution Markus. The server is working great on ND+2. Can't wait to try the file list.


Glad to here that :)
If you also want to use the other Features, not only the file list, be sure to follow this post:

Hint for those converting this 4.1 project to 4.2:

See the changes below, where "SecretLabs.NETMF.Hardware." has been added in front of PWM and AnalogInput references. Also add those two SecretLabs references. (Hardware.PWM and Hardware.AnalogInput) This is needed because SPOT now has their own built in ones, and the OP's code does not use them, as they did not exist in 4.1.

Cheers


//Output ports with PWM functionallity
         static private SecretLabs.NETMF.Hardware.PWM PWM5 = new SecretLabs.NETMF.Hardware.PWM(Pins.GPIO_PIN_D5);
         static private SecretLabs.NETMF.Hardware.PWM PWM6 = new SecretLabs.NETMF.Hardware.PWM(Pins.GPIO_PIN_D6);
         static private SecretLabs.NETMF.Hardware.PWM PWM9 = new SecretLabs.NETMF.Hardware.PWM(Pins.GPIO_PIN_D9);
         static private SecretLabs.NETMF.Hardware.PWM PWM10 = new SecretLabs.NETMF.Hardware.PWM(Pins.GPIO_PIN_D10);       

         //Analog inputs
         static private SecretLabs.NETMF.Hardware.AnalogInput Analog0 = new SecretLabs.NETMF.Hardware.AnalogInput(Pins.GPIO_PIN_A0);
         static private SecretLabs.NETMF.Hardware.AnalogInput Analog1 = new SecretLabs.NETMF.Hardware.AnalogInput(Pins.GPIO_PIN_A1);
         static private SecretLabs.NETMF.Hardware.AnalogInput Analog2 = new SecretLabs.NETMF.Hardware.AnalogInput(Pins.GPIO_PIN_A2);
         static private SecretLabs.NETMF.Hardware.AnalogInput Analog3 = new SecretLabs.NETMF.Hardware.AnalogInput(Pins.GPIO_PIN_A3);
         static private SecretLabs.NETMF.Hardware.AnalogInput Analog4 = new SecretLabs.NETMF.Hardware.AnalogInput(Pins.GPIO_PIN_A4);
         static private SecretLabs.NETMF.Hardware.AnalogInput Analog5 = new SecretLabs.NETMF.Hardware.AnalogInput(Pins.GPIO_PIN_A5);

         static private OutputPort[] Digitals = new OutputPort[] { Digital0, Digital1, Digital2, Digital3, Digital4, null, null, Digital7, Digital8, null, null, Digital11, Digital12, Digital13 };
         static private SecretLabs.NETMF.Hardware.AnalogInput[] Analogs = new SecretLabs.NETMF.Hardware.AnalogInput[] { Analog0, Analog1, Analog2, Analog3, Analog4, Analog5 };
         static private PWM[] PWMs = new PWM[] { PWM5, PWM6, PWM9, PWM10 };
         static private bool[] PWM_On = new bool[] { false, false, false, false };


Greets, Markus

NeonMika.Webserver
> Control your N+ and write webservice methods easyily
> Receive data from you N+ (in XML or JSON)
> Browse the SD on your N+ directly in the browser and d
own - and upload files

 

If you need help with NeonMika.Webserver, please just leave a note in the thread and/or contact me via Skype :)

 

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- Mistakes teach you important lessons. Every time you make one, you are one step closer to your goal. ----
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------


#79 JerseyTechGuy

JerseyTechGuy

    Advanced Member

  • Members
  • PipPipPip
  • 870 posts

Posted 23 November 2012 - 10:55 AM

Glad to here that :)
If you also want to use the other Features, not only the file list, be sure to follow this post:



Greets, Markus


Yes, I made those changes when I tried it last Saturday. Very easy changes and it worked great.

#80 Mercer

Mercer

    Member

  • Members
  • PipPip
  • 17 posts

Posted 08 December 2012 - 05:36 PM

I am working on loading this on my N2+.

namespace NeonMika.Webserver
{
    /// <summary>
    /// Interface between NeonMika.Webserver and the executing programm
    /// Use this class to work with your pins
    /// </summary>
    static public class PinManagement
    {
        //Standard output ports
        static private OutputPort Digital0 = new OutputPort(SecretLabs.NETMF.Hardware.NetduinoPlus.Pins.GPIO_PIN_D0, false);

When I run the code, I get the following error when defining the standard output ports. The last line shown above.

A first chance exception of type 'System.ArgumentException' occurred in Microsoft.SPOT.Hardware.dll
An unhandled exception of type 'System.ArgumentException' occurred in Microsoft.SPOT.Hardware.dll

Uncaught exception


Any idea what I am doing wrong? Thanks.





Also tagged with one or more of these keywords: webserver, web server, neonmika, internet, web, server, http, sd, xml, json

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.