Hi everyone,
I made a program in VB that controls the LED lamps connected in arduino . I used an usb A-B cable for serial communication between the pc and the arduino.
however, something’s wrong whenever I use the Char data type when declaring the variable which will be sent to the Arduino as serial data (DEC) . the LED switching is not operational whenever I use the Char.
Then I changed it to STRING data type and suddenly worked .
But whenever I change the (Dim y As Char) the led is not blinking.
Please kindly explain why ‘’’‘char’’’’’ doesn’t seem to work.
Opening the serial port resets the Arduino. Closing it may reset the Arduino, too. You need to open the port ONCE, not every time you want to send data.