write a series of binary data to a pin

Im doing this course that asks us to send 10k bits in a second from one computer to another.
Device we have:
NI Daq 6009
Arduino mega
sound card and EarPods/mic
Is there any way to write a series of bits to a pin with any of device above?

Source: New Questions

1 Comment

  1. Digin Dominic

    Why are you filling a DataTable if you want to retrieve just a single field?
    ExecuteScalar executes the query, and returns the first column of the first row in the result set returned by the query. Additional columns or rows are ignored.

    Also you should use parameterized query in order to avoid SQL Injection.

    Off the top of my head…

    Dim RoomID As String = roomCB.SelectedIndex + 1.ToString()

    Dim sql As String = “SELECT Type.Name FROM Type INNER JOIN Room ON Type.TID = @parameter”

    Using cn As New SqlConnection(“Your Connection string here”), _
    cmd As New SqlCommand(sql, cn)

    cmd.Parameters.Add(“@parameter”, SqlDbType.VarChar, 50).Value = RoomID
    typeTxt.Text = cmd.ExecuteScalar().ToString()
    End Using


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.