On Saturday 01 Jun 2013,
b...@delarre.net wrote:
> Hi all,
>
> Real beaglebone newbie here but in desperate need of some help.
>
> I want to get an Arduino Micro hooked up to my BBB usb host port and the
> communicate between the two using serial libraries at both ends. This
> obviously is possible, but I'm completely clueless as to how to get
> started.
>
> The serial communication itself isn't so much of an issue, getting the BBB
> to recognise that the Arduino is connected and to get the serial port setup
> correctly is the hard bit.
>
> Any suggestions on where to start?
>
> Thanks
The difficulty with serial ports (tty) is that there is only a way of telling
that there is something at the other end, no standard way of telling what it
at the other end. This problem is nothing to do with either Linux, Arduino
or BBB, it is a general serial comms problem.
If you have only connected three wires (the minimum needed) RX, TX and GND
even detecting that there is something there is difficult. You need some
more pins, if necessary use a GPIO pin (remember level conversion) so that
you can detect that the other end is present. The traditional pins for
such things is to listen to the other end's RTS (request to send) pin, or
to the CD (carrier detect) pin which is the one used by a modem to say that
there is a link.
I would suggest putting what amounts to a ping function into the arduino
script, so if you send a particular string to the arduino it will respond
in a way you can check. Then you can have the linux end notice the connection
and then send out the ping and check the reply.
David