Serial Port Communication over C langage

Hello,

Just to share (gnu/nux working) C code i have done to communicate thrue serial port (by default ttyACMO - 57600) to control a reflex camera shooting (with gphoto2) and video file creation (with ffmpeg). The project is a wire remote control for an "object theatre". ( http://yvonne-tour.tumblr.com )

The very simple yvonne-remote.ino sketch look at some push buttons and send the changing state over serial port. The yvonne-remote program listen those serial information to initiate some commands in the computer.

As a feature of the Arduino to automaticaly reset the serial communication when opening the usb serial port i managed to do the stuff i did before inside a bash program directly inside the c code.

Source code : GitHub - d-j-a-y/yvonne-remote: Remote control for Yvonne va au bal, live cinema performance (arduino / gphoto2 / ffmpeg)

Run with an Arduino Mega 2560 over ubuntu 10.4.4 with recent ffmpeg ( -start_option needed )

Thank's to the arduino-serial from todbot blog – Random experiments, circuits, code, rapid prototyping, sometimes things to buy, and the odd tune by Tod Kurt., PushButton and Debounce example for some remix i did with.