mirror of
https://github.com/jdillenburg/esphome.git
synced 2026-03-18 04:09:14 -06:00
Fixed docs for adxl345
This commit is contained in:
@@ -46,16 +46,11 @@ libraries:
|
|||||||
### Basic Configuration
|
### Basic Configuration
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
# Define component
|
# Define component and sensors for accel_x, accel_y and accel_z
|
||||||
adxl345:
|
adxl345:
|
||||||
- id: my_adxl345
|
- id: my_adxl345
|
||||||
address: 0x53
|
address: 0x53
|
||||||
update_interval: 100ms
|
update_interval: 100ms
|
||||||
|
|
||||||
# Define sensors from component
|
|
||||||
sensor:
|
|
||||||
- platform: adxl345
|
|
||||||
id: my_adxl345
|
|
||||||
accel_x:
|
accel_x:
|
||||||
name: "Acceleration X"
|
name: "Acceleration X"
|
||||||
accel_y:
|
accel_y:
|
||||||
@@ -79,11 +74,6 @@ adxl345:
|
|||||||
address: 0x53
|
address: 0x53
|
||||||
update_interval: 100ms
|
update_interval: 100ms
|
||||||
range: 4G # Options: 2G, 4G, 8G, 16G
|
range: 4G # Options: 2G, 4G, 8G, 16G
|
||||||
|
|
||||||
# Define sensors with filtering
|
|
||||||
sensor:
|
|
||||||
- platform: adxl345
|
|
||||||
id: my_adxl345
|
|
||||||
accel_x:
|
accel_x:
|
||||||
name: "Acceleration X"
|
name: "Acceleration X"
|
||||||
filters:
|
filters:
|
||||||
|
|||||||
@@ -218,7 +218,7 @@ sensor:
|
|||||||
return rate;
|
return rate;
|
||||||
filters:
|
filters:
|
||||||
- sliding_window_moving_average:
|
- sliding_window_moving_average:
|
||||||
window_size: 10 # average 10 x 0.5 seconds = 5 seconds worth of speed
|
window_size: 5 # average 5 x 0.5 seconds = 2.5 seconds worth of speed
|
||||||
send_every: 1 # send average speed every 1/2 second
|
send_every: 1 # send average speed every 1/2 second
|
||||||
on_value:
|
on_value:
|
||||||
then:
|
then:
|
||||||
|
|||||||
Reference in New Issue
Block a user