4 Replies - 2040 Views - Last Post: 18 July 2008 - 05:01 PM Rate Topic: -----

#1 9jaguy  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 14-July 08

sending data (distance) from a sensor to my vb application

Posted 14 July 2008 - 01:14 PM

Hi,

Il be glad if someone can help with this.

Im working on a project which involves sending data (distance) from a sensor to my vb application. Im using vb 2005 so no MSComm!

I want my application to read the distance from the sensor once the port is opened and then plot the point on a graph (on the vb) relative to its first position.

I am using 2 sensors working as my x and y coordianates. Ill appreciate a quick response if possible as I have a time limit. Tanx

Is This A Good Question/Topic? 0
  • +

Replies To: sending data (distance) from a sensor to my vb application

#2 gabehabe  Icon User is offline

  • GabehabeSwamp
  • member icon




Reputation: 1382
  • View blog
  • Posts: 10,962
  • Joined: 06-February 08

Re: sending data (distance) from a sensor to my vb application

Posted 14 July 2008 - 01:16 PM

[rules][/rules]
Was This Post Helpful? 0
  • +
  • -

#3 9jaguy  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 14-July 08

Re: sending data (distance) from a sensor to my vb application

Posted 18 July 2008 - 05:02 AM

Tanx.

this is what I have written so far. This extracts the data from the sensor:

Private Sub DataReceived(ByVal sender As Object, ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) Handles serialPort.DataReceived
		txtDataReceived.Invoke(New myDelegate(AddressOf updateTextBox), New Object() {})

	End Sub

	Public Delegate Sub myDelegate()
	Public Sub updateTextBox()
		With txtDataReceived
			.Font = New Font("Garamond", 12.0!, FontStyle.Bold)
			.SelectionColor = Color.Red
			.AppendText(serialPort.ReadExisting)
			.ScrollToCaret()
		End With
	End Sub
End Class



Was This Post Helpful? 0
  • +
  • -

#4 Jayman  Icon User is offline

  • Student of Life
  • member icon

Reputation: 418
  • View blog
  • Posts: 9,532
  • Joined: 26-December 05

Re: sending data (distance) from a sensor to my vb application

Posted 18 July 2008 - 08:41 AM

Modified title to be more descriptive.
Was This Post Helpful? 0
  • +
  • -

#5 9jaguy  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 14-July 08

Re: sending data (distance) from a sensor to my vb application

Posted 18 July 2008 - 05:01 PM

View Postjayman9, on 18 Jul, 2008 - 08:41 AM, said:

Modified title to be more descriptive.

tanx...
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1