home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Support
Input / Output interfaces
Mini Display
Zalman HD135 VFD (VlSys Mplay)
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="-Manfred-" data-source="post: 220231" data-attributes="member: 50850"><p>For temp handling:</p><p></p><p>[CODE]def readTemp(fd):</p><p> # request the current temp</p><p> write(fd, 0)</p><p> write(fd, 0xAF)</p><p> time.sleep(0.000040)</p><p></p><p> res = select([fd], [], [])</p><p> if len(res[0]):</p><p> temp1 = -1</p><p> temp2 = -1</p><p> while temp2 == -1:</p><p> str = os.read(fd, 2)</p><p> if len(str) == 1:</p><p> if temp1 == -1:</p><p> temp1 = ord(str[0])</p><p> else:</p><p> temp2 = ord(str[0])</p><p></p><p> elif len(str) == 2:</p><p> temp1 = ord(str[0])</p><p> temp2 = ord(str[1])</p><p></p><p> else:</p><p> sys.stdout.write("Unexpected data during remp read: ")</p><p> for c in str:</p><p> sys.stdout.write( "0x%02x " % ord(c) )</p><p> sys.stdout.write("\n")</p><p> break</p><p></p><p> if temp2 != -1:</p><p> if 1: # farenheit</p><p> temp1 = (temp1 - 150) * 9 / 5 + 32</p><p> temp2 = (temp2 - 150) * 9 / 5 + 32</p><p> else: # celcius</p><p> temp1 = temp1 - 150</p><p> temp2 = temp2 - 150</p><p></p><p> return (temp1, temp2)</p><p></p><p> return None[/CODE]</p><p></p><p>More info here: <a href="http://lists.omnipotent.net/pipermail/lcdproc/2007-October/011966.html" target="_blank">http://lists.omnipotent.net/pipermail/lcdproc/2007-October/011966.html</a></p><p></p><p>and for repeating key here: <a href="http://www.nabble.com/New-driver-for-Vlsys-mplay-%28the-one-in-Zalman-Hd135-case%29-td14282379.html#a14468936" target="_blank">http://www.nabble.com/New-driver-for-Vlsys-mplay-%28the-one-in-Zalman-Hd135-case%29-td14282379.html#a14468936</a></p></blockquote><p></p>
[QUOTE="-Manfred-, post: 220231, member: 50850"] For temp handling: [CODE]def readTemp(fd): # request the current temp write(fd, 0) write(fd, 0xAF) time.sleep(0.000040) res = select([fd], [], []) if len(res[0]): temp1 = -1 temp2 = -1 while temp2 == -1: str = os.read(fd, 2) if len(str) == 1: if temp1 == -1: temp1 = ord(str[0]) else: temp2 = ord(str[0]) elif len(str) == 2: temp1 = ord(str[0]) temp2 = ord(str[1]) else: sys.stdout.write("Unexpected data during remp read: ") for c in str: sys.stdout.write( "0x%02x " % ord(c) ) sys.stdout.write("\n") break if temp2 != -1: if 1: # farenheit temp1 = (temp1 - 150) * 9 / 5 + 32 temp2 = (temp2 - 150) * 9 / 5 + 32 else: # celcius temp1 = temp1 - 150 temp2 = temp2 - 150 return (temp1, temp2) return None[/CODE] More info here: [URL="http://lists.omnipotent.net/pipermail/lcdproc/2007-October/011966.html"]http://lists.omnipotent.net/pipermail/lcdproc/2007-October/011966.html[/URL] and for repeating key here: [URL="http://www.nabble.com/New-driver-for-Vlsys-mplay-%28the-one-in-Zalman-Hd135-case%29-td14282379.html#a14468936"]http://www.nabble.com/New-driver-for-Vlsys-mplay-%28the-one-in-Zalman-Hd135-case%29-td14282379.html#a14468936[/URL] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Support
Input / Output interfaces
Mini Display
Zalman HD135 VFD (VlSys Mplay)
Contact us
RSS
Top
Bottom