Show Posts
Pages: 1 2 [3]
31  Using Arduino / Interfacing w/ Software on the Computer / Re: problem with visualbasic 2010 coding on: November 16, 2012, 05:56:28 am
tuxdino,i have try compile will your code.however..the compiling error still exist.the error stated that "A first chance exception of type 'System.InvalidOperationException' occurred in System.dll"

32  Using Arduino / Networking, Protocols, and Devices / NRF24l01 or Xbee? on: November 15, 2012, 09:06:07 pm
hi everyone..
im working on wireless sensor network for remote monitoring system. im thinking of best receiver to use for multiple node of transmitter that can be receive by single transceiver?can anyone share which one is better for WSN application with some arguments...tq
33  Using Arduino / Interfacing w/ Software on the Computer / Re: problem with visualbasic 2010 coding on: November 15, 2012, 10:20:23 am
tuxduino...

actually i got the coding from other pages.

Private Sub Button1_Click(ByVal sender As Object, ByVal _e As EventArgs) Handles Button1.Click
        If Button1.Text = "Close" Then    ' will fail it button's text is " Close" (notice the extra space)
            SerialPort1.Close()
            Button1.Text = "Open"
        Else
            If Not SerialPort1.IsOpen Then SerialPort1.Open()    ' where is endif ?

            Button1.Text = " Close"    ' one extra space!( meaning of the code)?

        End If// here is the end if .
    End Sub

hope u can help me in understanding me the button.text= "close" code..i can get ur comment on that code.
34  Using Arduino / Interfacing w/ Software on the Computer / Re: problem with visualbasic 2010 coding on: November 15, 2012, 10:17:22 am
PaulS, here is the declaration for the serialport1.

Public Class Form1
    Dim voltage As Integer
    Dim WithEvents longitude As SerialPort = New  _
        System.IO.Ports.SerialPort("COM23", 9600, Parity.None, 8, StopBits.One)

however, i still get the same error " system.InvalidOperationException ".
35  Using Arduino / Interfacing w/ Software on the Computer / Re: problem with visualbasic 2010 coding on: November 11, 2012, 10:09:25 am
paul...how to intialized the serial port1?
36  Using Arduino / Sensors / Re: multiple sensors on one pin on: November 08, 2012, 10:40:28 pm
what is the suitable transceiver model that can receive multiple transmitted data in serial at same time with minimal cost?
37  Using Arduino / Interfacing w/ Software on the Computer / Re: problem with visualbasic 2010 coding on: November 08, 2012, 03:52:27 am
should it be initialized?how? because previously i have complied the code, but no error happens. how ever , the error appeared as i put the timer function to the code.
38  Using Arduino / Interfacing w/ Software on the Computer / Re: problem with visualbasic 2010 coding on: November 07, 2012, 12:26:44 pm
i cannot paste the print screen of the error..

after compiling the coding...another window appeared stated that " an invalid operation excerption was unhandled"
The error is: Failed to initialize because CategoryName is missing

tq.
39  Using Arduino / Interfacing w/ Software on the Computer / problem with visualbasic 2010 coding on: November 07, 2012, 04:11:39 am
hi everyone,
need ur help to solve the problem that i face.im working on developing the flood monitoring system, using serial data received, then manipulte the data by arduino atMega328 deumilanove. im trying to do the visual basic command but i got an error stated that there are command that is not initialized.my coding are as follows.

visual basic 2010 coding.

Imports System.Text
Imports System.IO.Ports
Imports System.Threading
Imports System.TimeZone
Imports System.Math

Public Class Form1
    Dim voltage As Integer
    Delegate Sub ProcessDataDelegate(ByVal Longitude As String, ByVal Latitude As String)
    Private Sub SerialPort1_DataReceived(ByVal sender As Object, _
                                         ByVal e As SerialDataReceivedEventArgs) Handles SerialPort1.DataReceived
        Try
            Dim Longitude As Integer = SerialPort1.ReadLine()
            Dim Latitude As Integer = SerialPort1.ReadLine()
            Me.Invoke(New ProcessDataDelegate(AddressOf ProcessData), Longitude, Latitude)
        Catch ex As Exception
            MessageBox.Show(ex.ToString, " Unable to get the location")
            SerialPort1.Close()
        End Try
    End Sub
    Sub ProcessData(ByVal Longitude As String, ByVal Latitude As String)
        TextBox1.Text = Longitude
        TextBox2.Text = Latitude
    End Sub
    Private Sub Button1_Click(ByVal sender As Object, ByVal _e As EventArgs) Handles Button1.Click
        If Button1.Text = "Close" Then
            SerialPort1.Close()
            Button1.Text = "Open"
        Else
            If Not SerialPort1.IsOpen Then SerialPort1.Open()

            Button1.Text = " Close"

        End If
    End Sub
    Private Sub Form1_FormClosing(ByVal sender As Object, ByVal _e As FormClosingEventArgs
                                  ) Handles Me.FormClosing
        SerialPort1.Close()

    End Sub
   
    Private Sub WebBrowser2_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser2.DocumentCompleted
        WebBrowser2.Navigate("maps.google.com/maps?q=")
    End Sub

    Private Sub CheckedListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
        If (voltage <= 0.5) Then
            MsgBox("Checked")
        Else
            MsgBox("Unchecked")

        End If
    End Sub


    Private Sub CheckedListBox1_SelectedIndexChanged_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckedListBox1.SelectedIndexChanged
        If CheckedListBox1.GetItemCheckState(voltage <= 0.5) Then
            CheckedListBox1.Text = True
            CheckedListBox1.CheckOnClick = True
        Else
            If Not CheckedListBox1.CheckOnClick Then
                CheckedListBox1.Text = False

            End If

        End If

    End Sub

    Private Sub TextBox3_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox3.TextChanged
        If (voltage <= 0.5) Then
            CheckedListBox1.Text = True
            MsgBox(" safe")
            TextBox3.Show()
        End If
            If (voltage >= 0.5 And voltage <= 0.6) Then
                CheckedListBox2.Text = True
                MsgBox(" WARNING")
                TextBox3.Show()
            End If
        If (voltage <= 0.6 And voltage <= 0.7) Then
            CheckedListBox3.Text = True
            MsgBox("DANGER")
            TextBox3.Show()
        End If

    End Sub

    Private Sub SplitContainer2_Panel2_Paint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles SplitContainer2.Panel2.Paint

    End Sub

    Private Sub SplitContainer1_Panel1_Paint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles SplitContainer1.Panel1.Paint
     
    End Sub

    Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)

    End Sub

    Private Sub CheckedListBox2_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckedListBox2.SelectedIndexChanged
        If CheckedListBox2.GetItemCheckState(voltage >= 0.5 And voltage <= 0.6) Then
            CheckedListBox2.Text = True
            CheckedListBox2.CheckOnClick = True
        Else
            If Not CheckedListBox2.CheckOnClick Then
                CheckedListBox1.Text = False
            End If
        End If

    End Sub

    Private Sub CheckedListBox3_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckedListBox3.SelectedIndexChanged
        If CheckedListBox3.GetItemCheckState(voltage >= 0.6 And voltage <= 0.7) Then
            CheckedListBox2.Text = True
            CheckedListBox2.CheckOnClick = True
        Else
            If Not CheckedListBox2.CheckOnClick Then
                CheckedListBox1.Text = False
            End If
        End If
    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Timer1.Enabled = True
        Timer1.Interval = 1
    End Sub

    Private Sub PictureBox1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.Click


    End Sub

    Private Sub Label6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label6.TextChanged

        Label6.Text = DateString

    End Sub

    Private Sub Label7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label7.TextChanged

        Label7.Text = TimeOfDay
    End Sub
End Class


hope anyone can help me solve this problem.thanks.
Pages: 1 2 [3]