Go Down

Topic: Control of motor on Keypress of keyboard (Read 1 time) previous topic - next topic


hey guys , let me cut to the chase , If i have to control a motor via serial port i`ll press the button and press enter on serial port monitor that would increase/increment the speed etc.

Now the situation is that i`m in a far more reactive environment , I dont want to press the enter key and the need is to transmit the signal as soon as the key is pressed for example , if i press the 'w' key the speed of motor must continue to increase until the key is unpressed or the speed is maximum .

Kindly guide me with the general procedure to this


The Arduino has no problem detecting incoming characters with or without CR or LF.

So your question is how to do this on a PC.
The serial monitor of the Arduino IDE requires to press the 'Enter' key.
Also many serial terminal programs are used this way.

You could write a very simple program yourself for the PC.
There are also many scripted languages for such a program on the PC.

Perhaps someone else knows a ready-to-use solution ?

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131