Here is some VB code to control LED1 and LED2 using the HTTPServer demo and RPC.
Imports System.Net Imports System.Web
Public Class Form1 Dim client As New WebClient Dim query As String
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click query = "http://mbed-ip/rpc/led1/write+1" Try client.DownloadString(query) Catch ex As Exception End Try End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click query = "http://mbed-ip/rpc/led1/write+0" Try client.DownloadString(query) Catch ex As Exception End Try End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click query = "http://mbed-ip/rpc/led2/write+1" Try client.DownloadString(query) Catch ex As Exception End Try End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click query = "http://mbed-ip/rpc/led2/write+0" Try client.DownloadString(query) Catch ex As Exception End Try End Sub End Class
I done it.Now able to use VB.net communicate with my mbed. Thanks,TOM. I appreciated it.
Regards,
Charles
I done it.Now able to use VB.net communicate with my mbed. Thanks,TOM. I appreciated it.
Regards,
Charles
Important Information for this Arm website
This site uses cookies to store information on your computer.
By continuing to use our site, you consent to our cookies.
If you are not happy with the use of these cookies, please review our
Cookie Policy
to learn how they can be disabled.
By disabling cookies, some features of the site will not work.
Access Warning
You do not have the correct permissions to perform this operation.
I just downloaded the free Visual Basic Express 2008 from Microsoft and found that the communcation control object seems to work fine with MBED.
It is nice to have a rapid PC-host dev env as well :-)
Anders