6

I have a GPS unit with an IMU based on the Intel Edison I want to used alongside a Raspberry Pi for a robotics project. The general idea is that I want to use the Edison unit to provide the Pi with sensor data (gps, gyro, compass, ++) on a standardised format, and use the Pi to drive the robot itself. This will allow me to add further Edisons in the future, and/or replace them with newer and improved sensors without having to modify the computer driving the robot.

However, I'm stuck on how to integrate the two. My initial idea was to use the onboard USB ports for communications, but I don't quite know where to start. Reconfiguring the USB port to provide ethernet over USB is an alternative if that simplify things.

Having the Edison write continuously to the usb port with no other communication between the two is no problem, but there are scenarios where the Pi should send commands to the Edison in order to reset or calibrate one or more sensors or disable them during testing.

Is the best option to write a custom driver for this, or would I be better off using ethernet over USB and simply implement a server/client model using TCP?

If the USB driver option is the best, where would be a good place to look? This driver would essentially have to run one or more programs/commands on the Edison returning the output to the Pi.

Edit: As mentioned USB is the preferred method for connection, as it allows for both data and power to the Edison (driving it from the Pi) so I can avoid having to add a separate power source for the Edison. The messages will ideally be simple json strings going at a rate of approx 100/sec. The Edison is running Busybox and the Pi is on a Debian-based distro. Neither will have access to an external network while running, so they will be limited to USB or Ethernet over USB as there are no other physical connectors found on both units.

bjelleklang
  • 163
  • 5

1 Answers1

3

Configuring the USB port as Ethernet only complicates things. Not only does is throw the uncommon, proprietary RNDIS protocol into the mix, but then you need to add an IP server/client application on top.

The Micro USB connector on the Edison is already configured to provide a bridge to a UART using an FTDI chip. The Raspberry Pi already comes with (equally proprietary, but hugely common) FTDI drivers. The drivers will create a /dev/ttyUSB device on the Pi when the Edison is plugged in that you can talk to like any other serial port.

Create a server for the serial port on the Edison that responds to simple commands (or simply periodically sends data) and create a client for the virtual serial port on the Pi that handles the other end.

Heath Raftery
  • 683
  • 3
  • 7