How do I send ASCII string to Arduino over COM port?

I would like to send an ACII string over a com port using the linux terminal. How can I do that.

I am using Kubuntu 12.04

I am brand new to linux and serial communication. I just got an arduino. I got it up and running using the arduino serial manager. But I would like to use linux terminal instead so I will have more flexibility.

My arduino is /dev/ttyACM0

Thank you for help.

2 Answers

GNU Screen or something like that would do the job.

sudo apt-get update
sudo apt-get install screen

Then to connect to the board,

screen /dev/ttyACM0

You might have to change the baud rate, check the specs on the Arduino and read the screen manual to work out how to do that.

If your interested in making Linux 'talk' to your Arduino as in.. A Linux program does something and then tells the arduino to do something (or vice versa).

Then you may want to look into pySerial (a part of the Python scripting environment).

Need a working example? I made some code for DIY CNC machines.

You can find it here if you'd like to see it.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like