Pages: [1]   Go Down
Author Topic: Control of motor on Keypress of keyboard  (Read 851 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Offline Offline
Edison Member
*
Karma: 58
Posts: 2078
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 ?
Logged

Pages: [1]   Go Up
Jump to: