First little project with the Beaglebone

I would like to connect an Arduino to the Beaglebone true its USB host port to let the Arduino do all low level stuff. I thought it could not be that hard :) and after some trying it turned out it wasn’t.

I loaded the example sketch ASCII table by Tom Igoe that prints out byte values in all possible formats true the serial port of the arduin. If i could get that to print out in the console or in some serial console for linux.

But first I did’nt know what the device file would be named for an usb to serial adapter on the Beagelbone. So I plugged in my Arduino and  used the command dmesg | tail to see what happened.


root@beaglebone:~# dmesg | tail
[  712.471055] usb 1-1: SerialNumber: 64932343738351312182
[  712.471901] cdc_acm 1-1:1.0: ttyACM0: USB ACM device
[  961.711404] usb 1-1: USB disconnect, device number 5
[  963.279604] usb 1-1: new full-speed USB device number 6 using musb-hdrc
[  963.420999] usb 1-1: New USB device found, idVendor=2341, idProduct=0001
[  963.421019] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=220
[  963.421032] usb 1-1: Product: Arduino Uno
[  963.421043] usb 1-1: Manufacturer: Arduino (www.arduino.cc)
[  963.421054] usb 1-1: SerialNumber: 64932343738351312182
[  963.421916] cdc_acm 1-1:1.0: ttyACM0: USB ACM device
root@beaglebone:~#


So now when I know that I need to communicate with it and I found out that there are an serial console program called minicom in the Ångström distribution that I use on my Beaglebone. It seamed easy to use so I started up minicom in setup mode by the following command

root@beaglebone:~# minicom -s

Than I change the settings in minicom to use ttyACM0 as port and also change the boud rate to 9600.

Then I exit the setup menu and as soon I press the Arduino reset button it prints out the ASCII table as it should.
I think for the next step I will try to get an node.js script talking to the arduino and print out the result to the console.

I googled some and found this sites about communication with an arduino true node.js

And also an serial library for node.js that most use

Comments are closed.