I am working on moving a stepper using the Serial Monitor.
I have it working.
But:
The problem is that it seems the serial port does not send anything to Arduino unless I hit return ('\r).
(As far as I know.)
So, I can filter the '\r' from the input buffer when parsing the serial.read(), no worries.
But if I'm moving the stepper say 100 steps, one at a time, instead of pressing and holding a repeat mmmmmmmmm for lots of steps I have to press m, then CR, then m, then CR etc.
That, plus I'm moving in 2 dimensions, so I was going to use 4 key letters I want to enter to go +/- x and +/- y.
That many CR is far too slow.
Is there a trick to get the serial monitor to send char without pressing CR?
Or: Does anyone have a different scheme, such as psychokinesis?
I could use a joy stick, etc, or a complex encoding scheme such as enter "100mx" for move x 100 steps, and parse that, or movable hardware stops I could seek out. But all those are a lot more work if there is a simple idea I don't know about....
1. If you want to send the character(s) of the InputBox of the Serial Monitor (Fig-1), you must click on the Send Button or press on the Enter Key of the PC.
2. When you click on the Send Button (or press the Enter Key), all the characters of the InputBox are transmitted one-after-another and then the ASCII code for the character of the "Line ending tab" is transmitted. The Line ending tab has the following options: (1) No line ending (nothing will be sent) (2) Newline (0x0A will be sent) (3) Carriage return (0x0D) will be sent) (4) Both NL & CR (0x0D will be sent first and then 0x0A will be sent)
choice of terminal emulator depends on the functionality you require - i use (both free to download)
TeraTerm is simple and easy to use
RealTerm has lots more options, e.g. display Ascii, ANSI, HEX, etc
have implemented custom terminal emulators when particular functionality is required (e.g. send a complex text string when a key is hit or GUI button pressed) - generally writen in Java (portable across operating systems) but also C++, C#, etc
I'm torn on who to assign "solution" to. But I have to go with the helicopter guy as you suggested Coolterm which I already have up and running and working properly.
Thanks so much to Horace too!
You guys saved me from certain headaches...
Cheers!
Thanks, but it isn't a competition. What is helpful is that the topic is marked as solved so that anyone finding it later knows that there is a solution to be had in the topic
I have changed the solution attribution to you to keep it fair all round
I know that you are not asking me but I am convinced that the Serial monitor cannot do what is required, unless you know better, which I would be interested in
The requirement is to send a character as soon as the key is pressed rather than waiting for Return to be pressed. The Line ending setting has nothing to do with this
But that does not do what he/she wants if you read what he/she wrote later in their first post
Which to me says that he/she wants only to press a key to send a character to the Arduino and not need to do anything else. You are correct in your assertion that the 'Send' button can be clicked to send the user input but that is surely even worse than having to press Return
Having said that, the situation was confused by him/her mentioning removing '\r' from the Serial buffer because as we both know that is caused by the Line ending setting which could be set to 'No Line Ending' to prevent the '\r' being sent in the first place