Shop OBEX P1 Docs P2 Docs Learn Events
VB.net and the Spinneret — Parallax Forums

VB.net and the Spinneret

electromanjelectromanj Posts: 270
edited 2012-12-28 18:48 in Accessories
Hello. I have done a few projects with .net and the Propeller, and now that I am getting started with the Spinneret I was wondering how one would go about using a .net program with the Spinneret. I have gone through Mike g's tutorial (thanks Mike), and now I'm wondering if I would be able to use a .net application like below to control the Led? Any ideas where to get started?

Thanks.
370 x 365 - 12K

Comments

  • Mike GMike G Posts: 2,702
    edited 2012-12-27 15:13
  • electromanjelectromanj Posts: 270
    edited 2012-12-28 10:10
    Here's what I have so far. Turns the led on and off , and receives the state. I used Visual Basic 2010 Express.
    Public Class Form1
    
       
    
        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
    
        End Sub
    
       
    
       
        Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
            Dim request As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create("http://192.168.1.79:8080/led/23/off")
            Dim response As System.Net.HttpWebResponse = request.GetResponse()
    
            Dim sr As System.IO.StreamReader = New System.IO.StreamReader(response.GetResponseStream())
    
            Dim sourcecode As String = sr.ReadToEnd()
    
            TextBox1.Text = sourcecode
            TextBox1.BackColor = Color.White
        End Sub
    
       
        Private Sub onbutton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles onbutton.Click
            Dim request As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create("http://192.168.1.79:8080/led/23/on")
            Dim response As System.Net.HttpWebResponse = request.GetResponse()
    
            Dim sr As System.IO.StreamReader = New System.IO.StreamReader(response.GetResponseStream())
    
            Dim sourcecode As String = sr.ReadToEnd()
    
            TextBox1.Text = sourcecode
            TextBox1.BackColor = Color.Orange
    
    314 x 316 - 14K
    315 x 311 - 14K
  • Mike GMike G Posts: 2,702
    edited 2012-12-28 12:35
    Cool... easy-peasy
  • doggiedocdoggiedoc Posts: 2,241
    edited 2012-12-28 14:01
    Really awesome Travis! I wish I had the brain cells left to figure that stuff out!

    Paul
  • Mike GMike G Posts: 2,702
    edited 2012-12-28 17:04
    I've been building Browser based gadgets for communicating with the Spinneret/WizNet.

    Do folks want to see application based templates and gadgets?
  • WildatheartWildatheart Posts: 195
    edited 2012-12-28 17:23
    @ Mike

    Sooner rather than later, please.

    Also looking forward to seeing your work using the '5200. Thanks for sharing your knowledge and experience with us.
  • electromanjelectromanj Posts: 270
    edited 2012-12-28 18:48
    You bet! All info is appriciated!
Sign In or Register to comment.