* Update ds18b20.EN.md

Translating.
This commit is contained in:
vowstar 2014-12-09 13:03:56 +08:00
parent aae17e54d7
commit 5e805bba83
1 changed files with 8 additions and 8 deletions

View File

@ -33,7 +33,7 @@ ds18b20.setup(9)
<a id="ds18b20_addrs"></a>
## addrs()
####Description
Return all of the addresses table of DS18B20 on one-wire. 如果没有执行过setup(pin)则会自动对引脚9(GPIO2)进行单总线模式初始化。<br />
Return a table contain all of the addresses of DS18B20 on one-wire. If the setup(pin) function not executed, the pin 9(GPIO2) will be initialized as one-wire mode automatically. <br />
####Syntax
addrs()
@ -41,7 +41,7 @@ addrs()
####Parameters
nil
####Returns
addrs: 返回包含单总线上所有DS18B20器件的地址列表(table)。其中地址是字符串类型(String)。如果失败则返回nil. <br />
addrs: A table contain all of the addresses of DS18B20 on one-wire. Every address is a string. If failed, it will be nil. <br />
####Example
```lua
@ -60,14 +60,14 @@ end
<a id="ds18b20_readNumber"></a>
## readNumber()
####Description
读取温度数值。如果没有执行过setup(pin)则会自动对引脚9(GPIO2)进行单总线模式初始化。 <br />
Read the value of temperature. If the setup(pin) function not executed, the pin 9(GPIO2) will be initialized as one-wire mode automatically. <br />
####Syntax
readNumber(addr, unit)
####Parameters
addr: 字符串, DS18B20地址。 如果该Parameters为nil会自动选择第一个发现的地址。<br />
unit: 单位转换只接受常量C(摄氏度)F(华氏度) K(开氏度)。如果该Parameters为nil会自动选择常量C(摄氏度) 。<br />
addr: string, the address of DS18B20. It will select the first address which be found when this parameter is nil.<br />
unit: integer, unit conversion. Only Constant is acceptable, such as C(Celsius),F(Fahrenheit) and K(Kelvin). If this parameter is nil, the constant C(Celsius) will be selected automatically. <br />
####Returns
t1: 数值温度的整数部分。如果读取失败返回nil.<br />
@ -101,14 +101,14 @@ t1, t2 = t.readNumber()
<a id="ds18b20_read"></a>
## read()
####Description
读取温度字符串。如果没有执行过setup(pin)则会自动对引脚9(GPIO2)进行单总线模式初始化。 <br />
Read the string of temperature. If the setup(pin) function not executed, the pin 9(GPIO2) will be initialized as one-wire mode automatically. <br />
####Syntax
read(addr, unit)
####Parameters
addr: 字符串, DS18B20地址。 如果该Parameters为nil会自动选择第一个发现的地址。<br />
unit: 单位转换只接受常量C(摄氏度)F(华氏度) K(开氏度)。如果该Parameters为nil会自动选择常量C(摄氏度) 。<br />
addr: string, the address of DS18B20. It will select the first address which be found when this parameter is nil.<br />
unit: integer, unit conversion. Only Constant is acceptable, such as C(Celsius),F(Fahrenheit) and K(Kelvin). If this parameter is nil, the constant C(Celsius) will be selected automatically. <br />
####Returns
t: 字符串表示成字符串形式的温度。如果读取失败返回nil.<br />