View Full Version : "Bridging" pins in software... Noob question
03-18-2009, 08:42 AM
Hi everyone, I am trying to hook a CMUcam2+ up to a computer to focus it with the supplied java application. I would like to use the built in USB-Serial adapter on my Proto Board USB (pins 30 and 31) to talk to the computer. Is there a way to send the input supplied to one pin out another in software? If not, can I just connect the CMUcam serial pins to 30 and 31? This doesn't need to be a software solution, but that would be easiest for me. I thought I remembered reading something about this kind of task in the manual, but I can't find anything now that I've looked again. Also, I made an attempt at a serial proxy program using the FullDuplexSerial object, but it didn't seem to work. I'd be happy to post it if anyone wants to see it. I appreciate any advice/comments.
Thanks in advance,
03-18-2009, 09:01 AM
You need two copies of FullDuplexSerial, one for pins 30 and 31 and the other for the pins you connect to the CMUcam.и Your program would initialize both copies of FullDuplexSerial, then use rxcheck to read from the camera like this (one object is called PC and the other is called Cam).
ии if (a := Cam.rxcheck) <> -1
ии if (a := PC.rxcheck) <> -1
If you need to interrupt this for some reason, you can add that logic to the repeat statement.
This assumes that the Java application will need to send data back to the CMUcam.
03-18-2009, 09:40 AM
Thanks, for the input. I tried something just like that but got a constant stream of characters that look like a y with a dot over them. Would messing up the baud rate to and from the CMUcam cause this?
03-18-2009, 09:49 AM
Yes.и You might have an inverted signal.и Basically, make sure that FullDuplexSerial is configured for what the CMUcam needs.