Skip to content

Commit 60ff84e

Browse files
scopblakadder
andauthored
More spelling and grammar fixes (tasmota#1086)
Co-authored-by: blakadder <blakadder@users.noreply.github.com>
1 parent ed1bec1 commit 60ff84e

30 files changed

+44
-44
lines changed

docs/ADC.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Example: ADC as `Light (3)`
5454

5555
Command|Parameters
5656
:---|:---
57-
AdcParam<x\><a class="cmnd" id="adcparam"></a>|[ADC](ADC) analog input tuning parameters. On ESP32 x is channel `1..8`<br>`<sensor>, <param1>, <param2>, <param3>, <param4>`<BR>`<sensor>` values:<br>&emsp; `2` = Temperature [Steinhart-Hart thermistor equation](https://en.wikipedia.org/wiki/Steinhart%E2%80%93Hart_equation) parameters:</li><ul>`<param1>` = NTC Voltage bridge resistor in Ohms *(default = `32000`)*<br>`<param2>` = NTC Resistance in Ohms *(default = `10000`)*<BR>`<param3>` = NTC Beta Coefficient *(default = `3350`)*</li></ul><br>&emsp; `3` = Light [Lux equation](https://www.allaboutcircuits.com/projects/design-a-luxmeter-using-a-light-dependent-resistor/) parameters:</li><ul>`<param1>` = LDR Voltage bridge resistor in Ohms *(default = `10000`)*<BR>`<param2>` = LDR Lux Scalar *(default = `12518931`)*<BR>`<param3>` = LDR Lux Exponent *(default = `-1.4050`)*</li></ul><br>&emsp; `6` = ADC linear range remapping parameters:</li><ul>`<param1>` = input range low value `adcLow` *(default = `0`)*<BR>`<param2>` = input range high value `adcHigh` *(default = `1023`)*<BR>`<param3>` = output range low value `rangeLow` *(default = `0`)*<BR>`<param4>` = output range high value `rangeHigh` *(default = `100`)*<BR>The range remapping perform the following calculation on the ADC value *[0..1023]*:<BR>`Range = ((adcHigh - ADC) / (adcHigh - adcLow)) * (rangeLow - rangeHigh) + rangeHigh`<br>*The calculation is performed in double resolution floating point, but the output is a signed integer. All 4 input parameters are unsigned 16 bit integers.*<BR>Example to convert the ADC value on a D1-mini into millivolts (using the default resistor bridge of 220k/100k):<BR>`AdcParam 6, 0, 1023, 0, 3200`</li></ul><br>&emsp; `7` = CT POWER parameter adjustments:</li><ul>`<param1>` = ANALOG_CT_FLAGS (default 0 for a non-invasive current sensor). When value is `>0` its sets the `adcLow` value as base for the measurement via OpAmp differential amplifier.<BR>`<param2>` = ANALOG_CT_MULTIPLIER ( 2146 = Default settings for a (AC) 20A/1V Current Transformer.) multiplier\*100000 to convert raw ADC peak to peak range 0..1023 to RMS current in Amps. Value of 100000 corresponds to 1<BR>`<param3>` = ANALOG_CT_VOLTAGE (default 2300) to convert current in Amps to apparent power in Watts using voltage in Volts*10. Value of 2200 corresponds to AC220V. For DC its Volt/1000. Eg. 12VDC = 0.012.<BR> `AdcParam 7,406,3282,0.012`</li></ul><BR>&emsp; `9` = ANALOG_PH parameter adjustments:</li><ul>`<param1>` = ANALOG_PH_CALSOLUTION_LOW_PH (default 4.0).<BR>`<param2>` = ANALOG_PH_CALSOLUTION_LOW_ANALOG_VALUE ( default 282 )<BR>`<param3>` = ANALOG_PH_CALSOLUTION_HIGH_PH (default 9.18).<BR>`<param4>` = ANALOG_PH_CALSOLUTION_HIGH_ANALOG_VALUE (default 435).<BR><BR>To calibrate the probe, two reference solutions with known pH are required. Calibration procedure: <ol><li>Put probe in solution with lower pH value. pH value of the solution is ANALOG_PH_CALSOLUTION_LOW_PH.</li><li>Wait until analog value / RAW value stabilizes (~3 minutes)</li><li>The analog reading is ANALOG_PH_CALSOLUTION_LOW_ANALOG_VALUE</li><li>Clean probe and put in solution with higher pH value. pH value of the solution is ANALOG_PH_CALSOLUTION_HIGH_PH.</li><li>Wait until analog value / RAW value stabilizes (~3 minutes)</li><li>The analog reading is ANALOG_PH_CALSOLUTION_HIGH_ANALOG_VALUE</li></ol>Analog readings can be read by either changing the analog port configuration to "Analog Input" while calibrating, or by enabling debug logs in the console and having a look at the `RAW Value`reading instead.</li></ul><BR>&emsp; `10` = MQ-X sensors parameter adjustments:</li><ul>`<param1>` = ANALOG_MQ_TYPE (default 2) It used to specify sensor type. At the moment exists: 2, 3, 4, 5, 6, 7, 8, 9, 131, 135 (means MQ-02, MQ-03, MQ-04 ecc.).<BR>`<param2>` = ANALOG_MQ_A (default 574.25 a params for MQ-02) It is exponential regression a params<BR>`<param3>` = ANALOG_MQ_B (default -2.222 b params for MQ-02) It is exponential regression b params, generally negative<BR>`<param4>` = ANALOG_MQ_RatioMQCleanAir (default 15.0 RatioMQCleanAir params for MQ-02) NOT USED YET. It is threashold for good air in ppm for future alams arming<BR>Usage example for MQ-02, MQ-04, MQ-07 and MQ-131<BR> `AdcParam 10, 2.00, 574.25, -2.22, 9.83`<BR> `AdcParam 10, 4.00, 1012.70, -2.79, 4.40 `<BR> `AdcParam 10, 7.00, 99.04, -1.52, 27.50 `<BR> `AdcParam 10, 131.00, 23.94, -1.11, 15.00 `</li></ul><BR>
57+
AdcParam<x\><a class="cmnd" id="adcparam"></a>|[ADC](ADC) analog input tuning parameters. On ESP32 x is channel `1..8`<br>`<sensor>, <param1>, <param2>, <param3>, <param4>`<BR>`<sensor>` values:<br>&emsp; `2` = Temperature [Steinhart-Hart thermistor equation](https://en.wikipedia.org/wiki/Steinhart%E2%80%93Hart_equation) parameters:</li><ul>`<param1>` = NTC Voltage bridge resistor in Ohms *(default = `32000`)*<br>`<param2>` = NTC Resistance in Ohms *(default = `10000`)*<BR>`<param3>` = NTC Beta Coefficient *(default = `3350`)*</li></ul><br>&emsp; `3` = Light [Lux equation](https://www.allaboutcircuits.com/projects/design-a-luxmeter-using-a-light-dependent-resistor/) parameters:</li><ul>`<param1>` = LDR Voltage bridge resistor in Ohms *(default = `10000`)*<BR>`<param2>` = LDR Lux Scalar *(default = `12518931`)*<BR>`<param3>` = LDR Lux Exponent *(default = `-1.4050`)*</li></ul><br>&emsp; `6` = ADC linear range remapping parameters:</li><ul>`<param1>` = input range low value `adcLow` *(default = `0`)*<BR>`<param2>` = input range high value `adcHigh` *(default = `1023`)*<BR>`<param3>` = output range low value `rangeLow` *(default = `0`)*<BR>`<param4>` = output range high value `rangeHigh` *(default = `100`)*<BR>The range remapping perform the following calculation on the ADC value *[0..1023]*:<BR>`Range = ((adcHigh - ADC) / (adcHigh - adcLow)) * (rangeLow - rangeHigh) + rangeHigh`<br>*The calculation is performed in double resolution floating point, but the output is a signed integer. All 4 input parameters are unsigned 16 bit integers.*<BR>Example to convert the ADC value on a D1-mini into millivolts (using the default resistor bridge of 220k/100k):<BR>`AdcParam 6, 0, 1023, 0, 3200`</li></ul><br>&emsp; `7` = CT POWER parameter adjustments:</li><ul>`<param1>` = ANALOG_CT_FLAGS (default 0 for a non-invasive current sensor). When value is `>0` it sets the `adcLow` value as base for the measurement via OpAmp differential amplifier.<BR>`<param2>` = ANALOG_CT_MULTIPLIER ( 2146 = Default settings for a (AC) 20A/1V Current Transformer.) multiplier\*100000 to convert raw ADC peak to peak range 0..1023 to RMS current in Amps. Value of 100000 corresponds to 1<BR>`<param3>` = ANALOG_CT_VOLTAGE (default 2300) to convert current in Amps to apparent power in Watts using voltage in Volts*10. Value of 2200 corresponds to AC220V. For DC it's Volt/1000. Eg. 12VDC = 0.012.<BR> `AdcParam 7,406,3282,0.012`</li></ul><BR>&emsp; `9` = ANALOG_PH parameter adjustments:</li><ul>`<param1>` = ANALOG_PH_CALSOLUTION_LOW_PH (default 4.0).<BR>`<param2>` = ANALOG_PH_CALSOLUTION_LOW_ANALOG_VALUE ( default 282 )<BR>`<param3>` = ANALOG_PH_CALSOLUTION_HIGH_PH (default 9.18).<BR>`<param4>` = ANALOG_PH_CALSOLUTION_HIGH_ANALOG_VALUE (default 435).<BR><BR>To calibrate the probe, two reference solutions with known pH are required. Calibration procedure: <ol><li>Put probe in solution with lower pH value. pH value of the solution is ANALOG_PH_CALSOLUTION_LOW_PH.</li><li>Wait until analog value / RAW value stabilizes (~3 minutes)</li><li>The analog reading is ANALOG_PH_CALSOLUTION_LOW_ANALOG_VALUE</li><li>Clean probe and put in solution with higher pH value. pH value of the solution is ANALOG_PH_CALSOLUTION_HIGH_PH.</li><li>Wait until analog value / RAW value stabilizes (~3 minutes)</li><li>The analog reading is ANALOG_PH_CALSOLUTION_HIGH_ANALOG_VALUE</li></ol>Analog readings can be read by either changing the analog port configuration to "Analog Input" while calibrating, or by enabling debug logs in the console and having a look at the `RAW Value`reading instead.</li></ul><BR>&emsp; `10` = MQ-X sensors parameter adjustments:</li><ul>`<param1>` = ANALOG_MQ_TYPE (default 2) It used to specify sensor type. At the moment exists: 2, 3, 4, 5, 6, 7, 8, 9, 131, 135 (means MQ-02, MQ-03, MQ-04 ecc.).<BR>`<param2>` = ANALOG_MQ_A (default 574.25 a params for MQ-02) It is exponential regression a params<BR>`<param3>` = ANALOG_MQ_B (default -2.222 b params for MQ-02) It is exponential regression b params, generally negative<BR>`<param4>` = ANALOG_MQ_RatioMQCleanAir (default 15.0 RatioMQCleanAir params for MQ-02) NOT USED YET. It is threshold for good air in ppm for future alams arming<BR>Usage example for MQ-02, MQ-04, MQ-07 and MQ-131<BR> `AdcParam 10, 2.00, 574.25, -2.22, 9.83`<BR> `AdcParam 10, 4.00, 1012.70, -2.79, 4.40 `<BR> `AdcParam 10, 7.00, 99.04, -1.52, 27.50 `<BR> `AdcParam 10, 131.00, 23.94, -1.11, 15.00 `</li></ul><BR>
5858

5959
### Rule triggers
6060
Use these triggers in rules:

docs/Berry-Cookbook.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ end
214214

215215
**Step 2: verify the device**
216216

217-
To make sure the device is actually an MPU6886, we check it's signature by reading register 0x75. It should respond 0x19 (see datasheet for MPU6886).
217+
To make sure the device is actually an MPU6886, we check its signature by reading register 0x75. It should respond 0x19 (see datasheet for MPU6886).
218218

219219
```python
220220
[...]

docs/Berry.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ DAC is limited to specific GPIOs:
582582
> gpio.dac_voltage(25, 1250) # set voltage to 1250mV
583583
1255
584584
```
585-
Function returns closes voltage found. In this case its 1255 for setting to 1250.
585+
Function returns closes voltage found. In this case it's 1255 for setting to 1250.
586586

587587
### I2S
588588

@@ -943,7 +943,7 @@ Simple tcp client supporting string and binary transfers:
943943
- create an instance of the client with `var tcp = tcpclient()`
944944
- connect to the server `tcp.connect(address:string, port:int [, timeout_ms:int]) -> bool` Address can be numerical IPv4 or domain name. Returns `true` if the connection succeeded. Optional `timeout` in milliseconds. The default timeout is `USE_BERRY_WEBCLIENT_TIMEOUT` (2 seconds).
945945
- check if the socket is connected with `tcp.connected()`
946-
- send content with `tcp.write(content:string or bytes) -> int`. Accepts either a string or a bytes buffer, returns the number of bytes sent. It's you responsibility to resend the missing bytes
946+
- send content with `tcp.write(content:string or bytes) -> int`. Accepts either a string or a bytes buffer, returns the number of bytes sent. It's your responsibility to resend the missing bytes
947947
- check if bytes are available for reading `tcp.available() -> int`. Returns `0` if nothing was received. This is the call you should make in loops for polling.
948948
- read incoming content as string `tcp.read() -> string` or as bytes `tcp.readbytes() -> bytes`. It is best to call `tcp.available()` first to avoid creating empty response objects when not needed
949949
- close the socket with `tcp.close()`
@@ -988,7 +988,7 @@ Simple tcp server (socket) listening for incoming connection on any port.
988988
tcpserver Function|Parameters and details
989989
:---|:---
990990
constructor<a class="cmnd" id="tcpserver_constructor">|`tcpserver(port:int) -> nit`<BR>Opens a socket on `port` and starts lisenting to new incoming connections. If the server can't open the socket (ex: it is already in use) an exception is raised
991-
hasclient<a class="cmnd" id="tcpserver_hasclient">|`hasclient() -> bool`<BR>Returns `true` if a new client connected to the socket, in such case you shoult call `accept()`. You need to call this method regularly (ex: in event loop or fast\_loop)
991+
hasclient<a class="cmnd" id="tcpserver_hasclient">|`hasclient() -> bool`<BR>Returns `true` if a new client connected to the socket, in such case you should call `accept()`. You need to call this method regularly (ex: in event loop or fast\_loop)
992992
accept<a class="cmnd" id="tcpserver_accept">|`accept() -> instance:tcpclient or nil`<BR>Returns an instance of `tcpclient` for the new incoming connection, or raise an exception if no connection is available. You should call `hasclient()` returning `true` before calling `accept()`.
993993

994994
Full example:

0 commit comments

Comments
 (0)