i cannot for the life of me get VB to read from the Serial with out it either say access is denied or just freezing and not doing anything.
First i did my research and came across this on the old forum
Tried it and yes i renamed everything accordingly but nothing.
1.I know my arduino is actually sending data because i press the serial monitor and i see my data that i want sent.
2. I can Send from VB to arduino just fine with this code
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click SendSerialData(txt1.Text) 'this here send whats inside a text box to Com4 and Arduino gets it all just fine End Sub Sub SendSerialData(ByVal data As String) 'this is the function that is sending my data from VB to Arduino Using com4 As IO.Ports.SerialPort = My.Computer.Ports.OpenSerialPort("COM4") com4.WriteLine(data) End Using End Sub
Now you would figure that something like “com4.ReadLine” would fetch my data but it does not
this is oneway of doing it without using the SerialPort control which i have also tried and nothing
One thing to Note and what i think may be the problem
If i send data from VB to Arduino to Blink an led it will do it just fine, SO LONG as i DO NOT have serial monitor open in Arduino because then it says access denied.
So with that little bug witch is fine i dont need serial monitor open to send or receive data but still when sending from Arduino to VB it does not work.
by the way im on an Arduino uno revision 2 and Ide version 0022 , and Visual Basic 2010 express.
on a totally random side note: I just got an accelerometer and Ping from parallax and oh man they are so beautiful <3