hi
I am a newbie and needs help( I tried for more than 6 days but useless).
I have arduino mega + 10 LEDs.( in straight single row)
I have vb.net GUI, from it I want to send 10 LED numbers(1,1,2,1,3,1,4,0,5,1,6,0,7,1,8,0,9,0,10,1) and 10 LED status(may be 1(ON) or 0(OFF)) like this :
LED_1,LED_1_staus, LED_2,LED_2_staus,LED_3,LED_3_staus,…… LED_10,LED_10_staus
Here is vb.net code
Dim dataToSend As String
dataToSend = "1,0,2,1,3,1,4,1,5,0,6,0,7,0,8,1,9,1,10,0"
Try
If SerialPort1.IsOpen Then
SerialPort1.WriteLine(dataToSend)
SerialPort1.Close()
Else
SerialPort1.Open()
SerialPort1.WriteLine(dataToSend)
SerialPort1.Close()
End If
Catch ex As Exception
MsgBox(ex.ToString)
End Try
=======================================
Now I have arduino code problem to read back these values and put them into int (integer ) array to power LEDs ON or OFF on specific pattern
Any help please