个人工具
登录
查看“UbuntuHelp:1wireSoftware”的源代码 - Ubuntu中文
UbuntuHelp
讨论
查看源代码
历史
搜索
导航
首页
最近更改
随机页面
页面分类
帮助
编辑
编辑指南
沙盒
新闻动态
字词处理
工具
链入页面
相关更改
特殊页面
页面信息
查看“UbuntuHelp:1wireSoftware”的源代码
来自Ubuntu中文
←
UbuntuHelp:1wireSoftware
跳转至:
导航
,
搜索
因为以下原因,你没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
{{From|https://help.ubuntu.com/community/1wireSoftware}} {{Languages|UbuntuHelp:1wireSoftware}} There are several kinds of software available to work with 1wire technology, I'll be detailing those I know. Please feel free to add or edit what you see. == Introduction == 1wire technology gives you the chance to read temperatures, humidities, even detect rain and count door closures at great distances. Some of the software available for Linux makes controlling these things so simple as to nearly be trivial. And like always, there's choice and style. == OWFS == OWFS is a set of tools for reading/writing to the 1wire network. It's primary and IMO most clever one is OWFS itself: it reads the network and creates a directory of all that it sees. Reading a temperature becomes trivial. Here's how I turn on the exhaust fan in my trailer: <pre><nowiki> echo "1" > /var/1wire/1F.38C704000000/main/05.62E531000000/PIO </nowiki></pre> Here's how I turn it off: <pre><nowiki> echo "0" > /var/1wire/1F.38C704000000/main/05.62E531000000/PIO </nowiki></pre> Did I leave the fan on, or off? <pre><nowiki> cat /var/1wire/1F.38C704000000/main/05.62E531000000/PIO 0 </nowiki></pre> No, it's off. Good thing, too- might rain. The project's located at: http://owfs.sourceforge.net/ === owhttpd === This part of the package listens on port 81 like a web server, allowing you to 'walk around' the net and read values, setting some too. (screenshot) === owserver === This part lets you summarize the activity on one machine that actually connects tot the 1wire network, and remotely control it from across the globe. === owperl === A module that integrates nicely into perl for working with the network. === owpython === A module that integrates nicely into Python. === owphp === A set of bindings for PHP === owtcl === TCL bindings. === Building under Dapper === OWFS sure takes the work out of dealing with the network, and it provides a lot of options for other languages and protocols. Hey, let's build on on Dapper, shall we? What follows is largely based on Tomasz' Howto at [[http://tomasz.korwel.net/2006/07/02/owfs-instalation-on-ubuntu-606/]] ==== Install required software ==== The Universe repository is required to get fuse-utils. <pre><nowiki> apt-get install automake autoconf autotools-dev gcc g++ \ libtool libusb-dev fuse-utils libfuse-dev swig \ python2.4-dev tcl8.4-dev php5-dev </nowiki></pre> Get OWFS: Notice the version number will change. <pre><nowiki> cd /usr/src wget http://umn.dl.sourceforge.net/sourceforge/owfs/owfs-2.4p3.tar.gz </nowiki></pre> Extract the file: <pre><nowiki> tar zxpf owfs-2.4p3.tar.gz </nowiki></pre> Compile and install: <pre><nowiki> cd owfs-2.4p3 ./configure make && make install </nowiki></pre> Mount the 1wire filesystem: <pre><nowiki> mkdir /var/lib/1wire modprobe fuse /opt/owfs/bin/owfs -U -F /var/1wire </nowiki></pre> See if it's there: <pre><nowiki> ls /var/1wire 09.CF9EC8010000 10.64502F000800 alarm bus.0 simultaneous statistics structure system uncached </nowiki></pre> The 1F.XXXXXXXXXXXX devices there are hubs, that have other devices 'behind' them. The 10.64502F000800 above is a device for reading temperature. If you see something that looks similar, it's done. Several options are available, too; things specific to hardware, as well as whether to build the other packages, etc at the OWFS site. == Other Software == I've not used anything else, though I know there are alternatives, even alternatives for Windows, if you're so afflicted. :) == An Example: CounterMoon.org == I'm working on a trailer that uses Ubuntu, OWFS, and 1Wire technology. Come see what it looks like: [[UbuntuHelp:1wireAppCountermoon.org]] Back to the Meta [[UbuntuHelp:1wire]] ---- [[category:CategoryDocumentation]] [[category:UbuntuHelp]]
该页面使用的模板:
模板:From
(
查看源代码
)
模板:Languages
(
查看源代码
)(受保护)
模板:Languages/Lang
(
查看源代码
)(受保护)
返回至
UbuntuHelp:1wireSoftware
。