Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I send data to the arduino from the computer? I'm thinking sort of a prompt on the command line and some commands like "led1 on". Then, the arduino would process that and light up a certain led.

share|improve this question
opencircuits.com/Arduino_Command_Interpreter for example – russ_hensel Apr 1 '11 at 3:38
up vote 2 down vote accepted

You can use Serial.print("DATA") and on your pc build a program that listen on serial port.

if (Serial.value == "DATA") {

When you get correct value, do anythink.

Like gMail notifier.

hope this helps.

share|improve this answer

One of my favorite features I added to a project years ago was to implement a VT100 terminal. It was a pretty simple and flexible way to allow users to configure our Ethernet-based devices over an RS-232 connection. It had a tabbed interface, status updates, and could also accept commands. You can get surprisingly fancy with this simple approach.

share|improve this answer

Something that you can take advantage of is the Firmata approach. It's basically a way to control ports / read inputs on a microcontroller using serial commands (which sounds like what you're trying to do).

There is already a Firmata library for Arduino here. There are also a number of programs that implement the PC end of the conversation.

share|improve this answer

Your plan should work fine. You do not say what computer you have (PC Mac Linux etc.) but obviously you will need a program running on the computer that acts as a terminal emulator and allows you to send the command to the Arduino.

On the Arduino side you need to parse or decode the command, so best to keep the commands as simple as possible. For example instead of "Led 1 on" perhaps "L1+" and "L1-" to turn it on and off.

Many other people have done this sort of thing with Arduinos so if you Google you should find ots of samples.

share|improve this answer

The way I do it is with Max and the [serial] object. You can implement a simple terminal using the text editor GUI object. PureData is a free alternative, which has a similar solution, though I'm not sure what the object for serial communication is called.

share|improve this answer

How about Arduino Explorer: http://www.avr-developers.com/arduino_exp.html

From the site: "... allows you to examine memory, examine and toggle I/O pins, explore the mapping of Arduino pin numbers to AVR port names and bit numbers, scan I2C bus, look at interrupt vectors and much more. "

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.