Hi all,Ok, so some brief background on the project:
Overall trying to send images over a LASER. This is similar to data transmission over fiber optics but through air. Two of my major objectives are develop a program to grab a frame from the webcam, decompress that jpeg image, and then send the raw RGB data to a receiving computer via pulses on a LASER. What I have done:
Currently I'm working in Ubuntu Linux with Eclipse IDE and I have a C program written to use the libjpeg library and grab a frame, decompress it, and I have an array of RGB values ready to be transmitted. The problem:
At this point I'm looking for a form of digital I/O from Linux. I just need a ground output and a digital pin to pulse high and low to transmit binary data hopefully at a rate of 1MHz. Various Solutions:
- Parallel port:
Apparently this port is relatively easy to use and would work well for what I want however this port isn't used anymore. My desktop that I'm developing on doesn't have a parallel port and hopefully when I port this project to a laptop that won't have this port either so this solution doesn't seem very likely at this point which is why i'm looking for an alternative.
- USB-to-Serial Breakout boards:
I've looked at http://www.sparkfun.com/products/718
from spark fun, but I've never used one and would like some feed back on how easy those are to use.
- Using Arduino + Firmata:
So this solution is the main reason I'm posting this. I would like to be able to write to the usb connection from my C program in Eclipse in a Firmata format that Arduino can process to directly control any of the digital pins. Now this is where I am kind of confused about what Firmata does. Almost every resource I have previously found says to use Processing or OpenFrameworks to send the serial data, I don't believe I can use either of these because I'm developing my own program with the libjpeg decompression and stuff and I need the serial part to work with this. I would have to save all my data to a file from my C program then open back up from a processing script and then send it and I don't want to do that. I would like all this ability to be contained within my C program in Eclipse. From my understanding Firmata is just like a standard format for serial data that arduino can understand so technically if i knew what bytes needed to be sent I could send the same data which would be sent through Processing with my own code.
Another strict consideration is that I need this digital pin to be pulsed at very very consistent intervals so if sending firmata signals is inconsistent maybe that whole idea won't work. Direct Questions:
1. Would going with a USB-to-Serial breakout board be simpler than messing with Firmata / Arduino. If so why? Maybe higher frequency?
2. Is my understanding of Firmata correct, can I send commands to control Arduino within a generic C program without Processing/Openframeworks libraries?
3. Would there be any advantage to using a Windows environment for image decompression and digital output? ( I don't think libjpeg can be installed in windows but idk )
4. Is there a better solution to achieving digital output from Linux than those I have proposed?
Any help is appreciated,