Difference between revisions of "Onewire"
(i18n) |
(added client code) |
||
Line 37: | Line 37: | ||
</source> | </source> | ||
= Polling Mode = | = Polling Mode = | ||
+ | = Client Code = | ||
+ | The following scripts can be used to read onewire temperatures on a host computer using ECMD. | ||
+ | * [https://github.com/ethersex/ethersex-tools/blob/master/hardware/onewire/onewire_request.php PHP] | ||
+ | * [https://github.com/ethersex/ethersex-tools/blob/master/hardware/onewire/onewire_request.pl Perl] | ||
+ | * [https://github.com/ethersex/ethersex-tools/blob/master/hardware/onewire/onewire_request.py Python] | ||
+ | * [https://github.com/ethersex/ethersex-tools/blob/master/hardware/onewire/onewire_request.sh sh/bash] |
Latest revision as of 16:10, 9 July 2013
Onewire | |
---|---|
Status | Stable
|
menuconfig | I/O->Onewire support |
Pinning | yes |
Ecmd | yes |
Control6 | yes |
Depends on | ECMD |
Requires | - |
Code | https://github.com/ethersex/ethersex/tree/master/hardware/onewire |
Contents
Pinning
Define your Onewire Pins with
ONEWIRE_PORT_RANGE(PX#, PX@)
where
- PX# is a pin on PORTX
- PX@ is a pin on PORTX
every pin between and including PX# and PX@ will be a seperate Onewire bus. You can define up to eight buses on one PORT (all buses must be on the same PORT!)
If you just need a single bus, define the range like this:
ONEWIRE_PORT_RANGE(PX#, PX#)
Example
PORTD: PIN2, PIN3, PIN4
ONEWIRE_PORT_RANGE(PD2, PD4)
Polling Mode
Client Code
The following scripts can be used to read onewire temperatures on a host computer using ECMD.