RS-232 Projector control program

Discussion in 'Mac Programming' started by weaverra, May 9, 2009.

  1. weaverra macrumors regular

    Joined:
    Sep 27, 2006
    #1
    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.
     
  2. ChrisA macrumors G4

    Joined:
    Jan 5, 2006
    Location:
    Redondo Beach, California
    #2
    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.
     
  3. eharley macrumors newbie

    Joined:
    Dec 27, 2007
  4. weaverra thread starter macrumors regular

    Joined:
    Sep 27, 2006
    #4
    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

    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.
     
  5. weaverra thread starter macrumors regular

    Joined:
    Sep 27, 2006
    #5
    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?
     
  6. lee1210 macrumors 68040

    lee1210

    Joined:
    Jan 10, 2005
    Location:
    Dallas, TX
    #6
    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
     
  7. lucypaynter macrumors newbie

    Joined:
    Nov 4, 2009
    #7
    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.
     
  8. notjustjay macrumors 603

    notjustjay

    Joined:
    Sep 19, 2003
    Location:
    Canada, eh?
    #8
    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 :) )
     
  9. cheddarbob macrumors newbie

    Joined:
    Nov 14, 2009
    #9
    runing commands

    I have a list of commands, but what do i have do do to make them work?
     
  10. MacProjector, Jul 11, 2011
    Last edited by a moderator: Jul 11, 2011

    MacProjector macrumors newbie

    Joined:
    Jul 11, 2011
    #10
    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.
     

Share This Page