I'm looking to do a project with an Arduino and a Rasberry Pi, and before I buy the Pi i'd like to test out the concept with a computer running ubuntu. The is to expand on the Arduino Trumpet project at http://www.instructables.com/id/Arduino-Trumpet/ and allow it to play better sounding notes stored in mp3 files. I haven't found a way to pre-buffer/load mp3s in the arduino, so i'd like to set up a system where the Arduino triggers a program to run on the pi and passes it an argument (ie the swtich that was pressed). The project is very anti-google friendly because every search for "Arduino Driver" returns with the driver for input rather than output.
To sum up: how do I output data from an Arduino to a program on a computer?
Any help is appreciated.
Thanks!
You can connect your Arduino (Uno, Mega, etc.) via the USB port to a USB port on the Pi. "dmesg" output will show which USB device (/dev/usb0, etc.) the Arduino grabs. As you know, the Arduino emulates a serial device. From there it's just a matter of writing a program on the Pi that will communicate with a serial device -- perl Device::SerialPort, python pySerial, tail -f /dev/usb0, etc., and on the Arduino side it's just a matter of serial.print()ing whatever message you want to send.