Hi, I'm new here.
The Question(s)
So I have Device 1 on one end, which is an embedded device, and a Linux machine on the other, which will listen to output from Device 1.
Device 1 sends 2 byte data blocks through, say the serial port. Perhaps USB would be better, or ethernet? What exactly is the difference in reading from these media on Linux, and what kind of data should they be used for? It could be safe to say, that Device 1 sends updates to the Linux machine in a perhaps max 30 updates per second aka 60Bps. The communication between Device 1 and Linux machine is not bidirectional, for Device 1 is completely independent and will give data to Linux machine no matter what its state is.
What I'm even more interested about is, that how would one handle custom defined data coming from one of those media with Linux. There is 2 byte data chunks coming through, so how would one read / send those 2 bytes from / to the line without ever having to worry about mixing up the two bytes in the data. Is there a way in which to delimit data when sending, perhaps? If you think about MIDI data, it sends data to a sequencer or a device in 2-3 byte chunks as well, but it never ever mixes up the data in those chunks - even though the bytes can be all the same value.
I'm sorry about the vagueness of the question(s), but I appreciate all ideas you could provide.
If more specifics is needed, I'll be happy to elaborate.
[Rudiment] // Non important sidenote
What the question relates to?
We are making a robot, or actually two of them, which will in the end play real human instruments. We have already done this with a flute last year - it was not easy. Why we are doing this is because our school has this free-to-participate project to teach us about embedded devices and various project related things.
The reason why I'm here is that this year we are going a notch further. Last year our robot device was made so, that it changed MIDI data into electromagnetic finger movement, and somewhere in there was a Linux device feeding MIDI data out into a MIDI line. This Linux device was the Control Unit.
This year we will attach an embedded device to the Control Unit (Linux machine), which will namely read human given music tempo from a stick with a light emitting diode in the end - all this through a camera.
Now, we have defined the interface which will be between the Control Unit and the Image Recognition Unit (IRU), and it will basically work like this:
The IRU will send 2 byte blocks of information to the Linux machine on what the tempo is at a given time. How this data should be read and sent, as it is custom defined binary data, is what I need to figure out - possibly with the help of you guys
[/Rudiment]
Cheers =)