Saturday, January 25, 2014

Determine attached port and send data to Arduino in Terminal, on Linux

In Linux, to determine Arduino attached port, can use dmesg command:

  • Insert the USB cable connected with Arduino to PC USB port.
  • Enter command:
    $ dmesg
  • The new attached device should be list in last.
    It's ttyACM0 in my case. So /dev/ttyACM0 is the port of the device attached.
To send data to USB port, use the command:
$ echo "Hello Arduino-er" > /dev/ttyACM0

Determine attached port and send data to Arduino in Terminal
Determine attached port and send data to Arduino in Terminal
In the video below, the Arduino Esplora run the program in last post "Serial communication between Arduino Esplora and PC" to display char received from Serial to LCD screen.


No comments:

Post a Comment