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

A Tiny TinyCLR web server

webserver tinyclr www PWN analogue digital serials

  • Please log in to reply
6 replies to this topic

#1 nickatredbox

nickatredbox

    New Member

  • Members
  • Pip
  • 9 posts

Posted 25 March 2013 - 12:54 AM

A variation on a simple web server I found on line. A friend of mine wanted a simple demo as a start point for a .NET WWW project

 

 

You can bridge www to serial, flash the led, set digital outputs and set 4 servo positions

 

 

 

[color=rgb(0,0,0);font-family:monospace;font-size:13px;]This is a wee web server which allows reading and writing to Netduino hardware[/color]

[color=rgb(0,0,0);font-family:monospace;font-size:13px;]there is an index page[/color]

[color=rgb(0,0,0);font-family:monospace;font-size:13px;]http://ipaddress/index.htm[/color]


[color=rgb(0,0,0);font-family:monospace;font-size:13px;]COMMANDS[/color]

[color=rgb(0,0,0);font-family:monospace;font-size:13px;]http://ipaddress/?led=0[/color]
[color=rgb(0,0,0);font-family:monospace;font-size:13px;]http://ipaddress/?led=1[/color]

[color=rgb(0,0,0);font-family:monospace;font-size:13px;]Digital outputs on and off dout is the output number 0 to 3 state is 0 or 1 pind 0,1,2,3[/color]
[color=rgb(0,0,0);font-family:monospace;font-size:13px;]http://ipaddress/?dout=0&state=1[/color]
[color=rgb(0,0,0);font-family:monospace;font-size:13px;]http://ipaddress/?dout=0&state=0[/color]

[color=rgb(0,0,0);font-family:monospace;font-size:13px;]read 4 analogue inputs[/color]
[color=rgb(0,0,0);font-family:monospace;font-size:13px;]http://ipaddress/?anin[/color]


[color=rgb(0,0,0);font-family:monospace;font-size:13px;]set 4 PWM outputs pins 5,6,8,9[/color]
[color=rgb(0,0,0);font-family:monospace;font-size:13px;]http://ipaddress/?pwm=0&pos=1750[/color]


[color=rgb(0,0,0);font-family:monospace;font-size:13px;]Send serial data where werty is the string that is sent[/color]
[color=rgb(0,0,0);font-family:monospace;font-size:13px;]http://ipaddress/?serial=qwery[/color]

[color=rgb(0,0,0);font-family:monospace;font-size:13px;]COSM data[/color]
[color=rgb(0,0,0);font-family:monospace;font-size:13px;]https://cosm.com/users/nickatrdbox#[/color]

 

Source code

https://docs.google....dit?usp=sharing



#2 AndreaGobetti

AndreaGobetti

    New Member

  • Members
  • Pip
  • 6 posts
  • LocationItaly

Posted 08 April 2013 - 01:33 PM

Where can i download it? :)



#3 nickatredbox

nickatredbox

    New Member

  • Members
  • Pip
  • 9 posts

Posted 08 April 2013 - 07:05 PM

https://docs.google....dit?usp=sharing



#4 AndreaGobetti

AndreaGobetti

    New Member

  • Members
  • Pip
  • 6 posts
  • LocationItaly

Posted 08 April 2013 - 10:02 PM

I sent you a request of access, thank you! :)



#5 sebswed

sebswed

    Advanced Member

  • Members
  • PipPipPip
  • 45 posts
  • LocationSweden

Posted 10 April 2013 - 06:19 PM

Hello Nick

 

Thank you for providing the code. Unfortunately I'm a complete beginner. I downloaded all the files and opened the one called Program.cs.

When I create a new Netduino Plus 2 project in Visual C# 2010 Express and paste the (uncommented) code I get 4 errors

  • Namespace "NetduinoPlus" does not exist, are you missing an assembly reference
  • The name "Pins" does not exist in the current context
  • Namespace "WebServer" could not be found, are you missing a using directive or an assembly reference
  • Namespace "WebServer" could not be found, are you missing a using directive or an assembly reference

I'm sure most of you guys start laughing now :-)

Fact is, I have no idea what I have to do to make these error go away.

 

I assume (from other coding attempts) that I have to ad a reference? If yes, which one should I ad?

Or do I have to do something with the other files that I downloaded?

 

All help is appreciated :-)


Netduino Plus 2 (v4.2.2.2)


#6 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 10 April 2013 - 07:09 PM

There should probably be a project file, i.e a file with the .csproj extension. Try opening that one instead and things should fall into place.

#7 sebswed

sebswed

    Advanced Member

  • Members
  • PipPipPip
  • 45 posts
  • LocationSweden

Posted 10 April 2013 - 08:12 PM

Thank you Hanzibal!

That was indeed the problem :-)

 

Tack s mycket


Netduino Plus 2 (v4.2.2.2)






Also tagged with one or more of these keywords: webserver, tinyclr, www, PWN, analogue, digital, serials

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.