DC motor

can i send commands to arduino without pressing ener in the serial monitor like i want to move a car to and fro from w and s keys .
Thankx in advance.

can i send commands to arduino without pressing ener in the serial monitor like i want to move a car to and fro from w and s keys .
when i lift up my finger from w i stop moving forward and when i lift form s key it stop moving bakward.
Thankx in advance

To send keystrokes in the serial monitor in the IDE you need to click the "Send" button.

You should try another terminal program like the freeware "Putty" which sends the keystrokes without you having to press enter or "Send". Just check that the typematic capability keeps sending chars when you hold a key on the keyboard. You will need to constantly check the incoming chars in your sketch to determine when the key is released.

No, when you use the serial monitor, you need to send it yourself, it doesn't do it automatically. Try PuTTY, I use it myself and it does exactly what you want.

No. In serial monitor you must always press enter to send the data to Arduino. You can use another "serial monitor" that can do that, for example putty, or teraterm, or many others.

kindly tell me or guide me to how to use putty plz . any tutorials or links . it will be a great help :slight_smile: Thankx in advance

kindly tell me ho tow use putty or how to link it with arduino . any links or tutorials will be helpful :slight_smile: Thankx both of you :slight_smile:

I just sent this as a PM, but I'll put it here too.

Putty is really simple, but in order to use it, you first need to know the COM port the bluetooth module is set to.

I don't have a MAC, so I don't know where to get that information. But if you have a PC, then you can go to your Device Manager, under your Control Panel, and look for Ports(COM & LPT). Once your Bluetooth module is paired to your computer, you should see it when you click on the down arrow, next to Ports(...). It should also tell you the COM port associated with that module.

Please note: If you have an arduino connected to your computer, you will also see it's COM port too.

Once you have the COM port for the Bluetooth module, open up Putty. You should see a button next to Serial, click it.

Now you should notice the boxes above have changed to COM1 and 9600. I don't know what your baud rate is but for now, leave it at 9600. All you need to do is change the COM port number to whatever your BT module is set to.

Mine is on COM7 (No space between them), but yours may differ.

Now test it by clicking open.

Once it works, enter the information again, COM port and Baud rate, (if the baud rate did work) and now you can save it, by going to the box underSaved Sessions and adding a name of your choice. I just put BTMod1.

Finally click save. the name will be added and all you need to do is double click on the name and it will open.

If you get a small error box, it is possible the COM port number you entered is not correct, or the baud rate is not at 9600. Usually when you pair a bluetooth module, 2 COM ports are created, but only one works. And sometimes the Bluetooth modules are set to 38,400 baud.

Try it with these configurations.

An easier way is to open the Arduino IDE and under the "Tools" menu click on "Serial port".
This will list the available serial ports that you can then use in Putty.