Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

weaverra

macrumors 6502
Original poster
Sep 27, 2006
250
2
What would it take to program a simple gui interface program to interact with the RS-232 of a projector? Like where I could have a button assigned to send the RS-232 command to turn the projector on and off? I have never programmed before, but I am ambitious. I would like to learn so I could get there.
 
What would it take to program a simple gui interface program to interact with the RS-232 of a projector? Like where I could have a button assigned to send the RS-232 command to turn the projector on and off? I have never programmed before, but I am ambitious. I would like to learn so I could get there.

As programs go it would be very easy. In UNIX (Mac OS X is Unix) all devices look and act like files, so all you have to do is "print" the the device that connects to the RS-232 conector. Of course ypu'd need a hardware rs-232 interface. Likely an usb/rs232 gadget.

You can test out the commands by simply sending commands from the terminal without any programming. Just use the "cat" command.

Building the GUI part is harder but any method would work, even Applescript.
 
Do you know the format of all the commands?

Yes, I actually downloaded the manual for the RS-232 codes for the Benq SP920.

<CR>*pow=on#<CR>

ftp://12.145.38.159/projector/software/rs232_code_sp920.pdf

As programs go it would be very easy. In UNIX (Mac OS X is Unix) all devices look and act like files, so all you have to do is "print" the the device that connects to the RS-232 conector. Of course ypu'd need a hardware rs-232 interface. Likely an usb/rs232 gadget.

You can test out the commands by simply sending commands from the terminal without any programming. Just use the "cat" command.

Building the GUI part is harder but any method would work, even Applescript.

Well I am glad to he it should be fairly easy. Basically I want to create a interface with buttons for each command I want to use and maybe create tabbed windows for Simple settings, Picture, Mode, on/off/ source select ect. This is for my church and I want to make it easy for anybody to use. I would also like to use it for our switcher/scaler too.
 
As programs go it would be very easy. In UNIX (Mac OS X is Unix) all devices look and act like files, so all you have to do is "print" the the device that connects to the RS-232 conector. Of course ypu'd need a hardware rs-232 interface. Likely an usb/rs232 gadget.

You can test out the commands by simply sending commands from the terminal without any programming. Just use the "cat" command.

Building the GUI part is harder but any method would work, even Applescript.

So if I use the "cat" command what do I need to do?

Do I type the command then the device used and then the command or do I need to put the command into a file and send the file?
 
if you had each command in a separate file, you could do something like:
cat setPortraitCommand > /dev/myProjDevice

Otherwise, in C you could just open the file and do fprintfs to it.

-Lee
 
Mac inter-face for RS 232?

Hi there, I love my mac and I love my projector. My projector manufacturer makes a controller for my projector but it only runs on *windows* :(
So if anyone hears of a program, or even just a bit of an interface someone has put together for their mac, that they would be willing to addapt or share, then please drop me a line. lucypaynter1@gmail.com ta muchly.
 
The projector at my church has a built-in HTTP server for controlling its functions. You could probably do something that looks similar if you have a computer acting as a server (or running the server on the local machine). You could use PHP or Java to write up some simple serial comms code, and then build a little web page that lays out the buttons.

A fun project would be to build a little microcontroller board with physical pushbuttons. (At least, this is the sort of project that I would find fun :) )
 
So I have a projector hooked up through USB -> RS-232 cable -> Projector. Is there anyway to send rs232 commands to it?

I just need the basic power on power off commnads. Could anyone give me an example?
Thanks!

We're actually in the process of getting a RS232 to USB connector so we can plug it into the Mac OS X.

I was hoping to just write the basic cat ? commands and save them on the desktop to turn on and off the projector.
 
Last edited by a moderator:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.