Click here to Skip to main content
16,015,531 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
In VB.net I have a button to send arduino to control LED.
But some times I have to push Button 3-4 times to make the LED on in arduino side.
Where is the delay?
Is it in PC/vb side or arduino side?
How to ensure that LED is on in one attemp of button press?

I am using USB virtual comport.


thanks

What I have tried:

Where is the delay?
Is it in PC/vb side or arduino side?
How to ensure that LED is on in one attemp of button press?
Posted
Updated 29-Mar-23 18:38pm
v3
Comments
CPallini 28-Mar-23 3:09am    
A bit of posted code would possibly help.
Dave Kreskowiak 28-Mar-23 8:40am    
You're communicating over what amounts to a serial port, not USB. It's in the name. USB is an expansion bus, not a port.

Without seeing the code on BOTH SIDES, it's impossible for anyone to tell you what's wrong.

There is no "delay". Chances are really high that you have mis-matched communication parameters when you setup the serial communication interface.

1 solution

We can't tell: we have no way to know what software you are running on the PC or the Arduino, any idea what data you are sending, or any idea how the two devices are physically connected - and since the two interact you need all of these things working together to even begin working it out.

So start with the arduino: change the software to log all incoming data, and what the device did with it. Push the button many times. Examine the log, see what it thinks is going on.

From there, you can start planning where to look for problems, but we can't do any of that for you!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900