Difference between revisions of "Mitsubishi HC1500"

From LinuxMCE
Jump to: navigation, search
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
[[Category: Hardware]]
 
[[Category: Tutorials]]
 
[[Category: Tutorials]]
 
[[Category: GSD]]
 
[[Category: GSD]]
[[category:video]]
+
[[Category: Video]]
[[category: Hardware]]
+
[[Category: Projectors]]
 
{{stub}}
 
{{stub}}
 
== Controlling a Mitsubishi HC1500 Projector with RS232 ==
 
== Controlling a Mitsubishi HC1500 Projector with RS232 ==

Latest revision as of 17:14, 29 September 2010

This article is a stub and requires expansion


Controlling a Mitsubishi HC1500 Projector with RS232

Future home of HC1500 howto



Ruby Code

Section: 193 Off

log("Sending Off Command")
<$"00\x22\x0D"$>
sleep(2)
<$"00\x22\x0D"$>


Section: 192 On

log("Sending On Command")
<$"00\x21\x0D"$>
sleep(2)
<$"00\x21\x0D"$>


Section: 373 Prive Method Listing

#Written by Jason Bennett
def testMsg(msg)
 cmd = Command.new(device_.devid_, -1001, 1, 2, 48)
 if (msg =~ /00\x21/)
   cmd.params_[10] = "1"   #Device Turned on
   log("Telling DCE Projector is on")
 end
 if (msg =~ /00\x22/)
   cmd.params_[10] = "0"   #Device Turned off
   log("Telling DCE Projector is off")
 end
 SendCommand(cmd)
end
def recvMsg()
 reply = String.new
 while (true)
   buff = conn_.Recv(1, -1)
   if (buff.length() == 0)
     break
   end
   reply = reply + buff[-1].chr
 end
 log("New Message: #{reply}")
 return reply
end
def log(line)
 $log = File.open("/var/log/pluto/" + device_.devid_.to_s + "_Generic_Serial_Device.log", "a")
 $log.puts "(***):" + line.to_s
 $log.close
end


Section: 350 Process Incoming Data

#Written by Jason Bennett
msg = recvMsg()
testMsg(msg)
log("Message Caught: #{msg}")


Section: 355 Process Initialize

<$"00\x21\x0D"$>