Hi,
I'm attempting to build an ROV using an Arduino Mega and 3 brushless motors. My aim is to be able to control the motors using a laptop and keyboard on the surface. So far I am controlling the motors using 'serial' and the serial monitor in the Arduino software. I can turn motors on and off by presseing a key then the return key.
I cannot work out how I would control them by only pressing the key without the need to press return. I.e. ROV moves forward when 'w' is depressed and stops when released.
I cannot work out how I would control them by only pressing the key without the need to press return. I.e. ROV moves forward when 'w' is depressed and stops when released.
Do you mean control I should control the ROV using an IR remote and not a key board? As I will be using a laptop for collecting video I would want to control the ROV using the laptops keyboard, not another device.
This is purely a limitation of the Arduino IDE serial monitor which only sends the whole line of text when Enter is pressed. A standard terminal program will send each character as you press the key - and if you hold the key pressed it will repeatedly send the same character which is clearly what you require.