Onewire
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.