mirror of
https://github.com/meshtastic/meshtastic.git
synced 2024-12-25 21:54:20 -08:00
add environment examples with sensors
This commit is contained in:
parent
396ea498c5
commit
19a0328b32
|
@ -85,6 +85,99 @@ The device must be restarted after the settings have been changed for the plugin
|
|||
|
||||
The sensors can be wired differently, here's one example for sensor DS18B20 https://randomnerdtutorials.com/esp32-ds18b20-temperature-arduino-ide
|
||||
|
||||
## Example of T-LoraV1 with DHT22 temperature sensor
|
||||
|
||||
Setup of a T-LoraV1 with DHT22 temperature sensor.
|
||||
|
||||
[<img src="T-LoraV1 with DHT22" src="/img/hardware/lora_v1_with_DHT22.jpg" style={{zoom:'25%'}} />](/img/hardware/lora_v1_with_DHT22)
|
||||
|
||||
Requirements:
|
||||
* T-LoraV1 (but any esp32 should work, just be sure to double check which GPIO to use)
|
||||
* DHT22 sensor
|
||||
* 10 Kohm resistor (optional, but recommended)
|
||||
* breadboard (optional)
|
||||
* two red wires (could be a different color, but 5V is typically red)
|
||||
* two yellow wires for GPIO (could be a different color)
|
||||
* one black wire (could be a different color, but GROUND is typically black)
|
||||
|
||||
Steps:
|
||||
* disconnect power/battery
|
||||
* connect black wire from GROUND to "-" on the DHT22
|
||||
* connect yellow wire from middle PIN to a row on bread board
|
||||
* connect red wire from 5V to a row on breadboard
|
||||
* connect resistor between red and yellow rows
|
||||
* connect red wire from row with red to "+" on DHT22
|
||||
* connect yellow wire from yellow row to GPIO on device (ex: GPIO21)
|
||||
* double check the cabling (if you get it wrong, you can damage the device and/or the DHT22 sensor)
|
||||
* plug in device
|
||||
* configure the device:
|
||||
|
||||
```
|
||||
meshtastic --set environmental_measurement_plugin_measurement_enabled true --set environmental_measurement_plugin_screen_enabled true --set environmental_measurement_plugin_update_interval 15 --set environmental_measurement_plugin_display_farenheit true --set environmental_measurement_plugin_sensor_type DHT22 --set environmental_measurement_plugin_sensor_pin 21
|
||||
```
|
||||
|
||||
:::tip
|
||||
You can change the values above to suit your needs. The commands can be run one at a time or in a group as show above.
|
||||
:::
|
||||
|
||||
* reboot/reset the device (press the RST button or unplug/plug in the device)
|
||||
* when the device boots it should say "Environment" and it may show the sensor data
|
||||
* if "no data", then triple check the wiring
|
||||
* if still "no data", run:
|
||||
|
||||
```
|
||||
meshtastic --info
|
||||
```
|
||||
|
||||
and verify the the environmental_measurement_plugin_sensor_type and environmental_measurement_plugin_sensor_pin
|
||||
|
||||
|
||||
## Example of T-LoraV1 with Dallas DS18B20 temperature sensor
|
||||
|
||||
Setup of a T-LoraV1 with DS18B20 temperature sensor.
|
||||
|
||||
[<img src="T-LoraV1 with DS18B20" src="/img/hardware/lora_v1_with_DS18B20.jpg" style={{zoom:'25%'}} />](/img/hardware/lora_v1_with_DS18B20)
|
||||
|
||||
Requirements:
|
||||
* T-LoraV1 (but any esp32 should work, just be sure to double check which GPIO to use)
|
||||
* DS18B20 sensor
|
||||
* 10 Kohm resistor (optional, but recommended)
|
||||
* breadboard (optional)
|
||||
* two red wires (could be a different color, but 5V is typically red)
|
||||
* two yellow wires for GPIO (could be a different color)
|
||||
* one black wire (could be a different color, but GROUND is typically black)
|
||||
|
||||
Steps:
|
||||
* disconnect power/battery
|
||||
* connect black wire from GROUND to "-" on the DS18B20
|
||||
* connect yellow wire from DAT pin to a row on bread board
|
||||
* connect red wire from 5V to a row on breadboard
|
||||
* connect resistor between red and yellow rows
|
||||
* connect red wire from row with red to "VCC" on DS18B20
|
||||
* connect yellow wire from yellow row to GPIO on device (ex: GPIO21)
|
||||
* double check the cabling (if you get it wrong, you can damage the device and/or the sensor)
|
||||
* plug in device
|
||||
* configure the device:
|
||||
|
||||
```
|
||||
meshtastic --set environmental_measurement_plugin_measurement_enabled true --set environmental_measurement_plugin_screen_enabled true --set environmental_measurement_plugin_update_interval 15 --set environmental_measurement_plugin_display_farenheit true --set environmental_measurement_plugin_sensor_type DS18B20 --set environmental_measurement_plugin_sensor_pin 21
|
||||
```
|
||||
|
||||
:::tip
|
||||
You can change the values above to suit your needs. The commands can be run one at a time or in a group as show above.
|
||||
:::
|
||||
|
||||
* reboot/reset the device (press the RST button or unplug/plug in the device)
|
||||
* when the device boots it should say "Environment" and it may show the sensor data
|
||||
* if "no data", then triple check the wiring
|
||||
* if still "no data", run:
|
||||
|
||||
```
|
||||
meshtastic --info
|
||||
```
|
||||
|
||||
and verify the the environmental_measurement_plugin_sensor_type and environmental_measurement_plugin_sensor_pin
|
||||
|
||||
|
||||
## Known Problems
|
||||
|
||||
|
|
BIN
static/img/hardware/lora_v1_with_DHT22.jpg
Normal file
BIN
static/img/hardware/lora_v1_with_DHT22.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.5 MiB |
BIN
static/img/hardware/lora_v1_with_DS18B20.jpg
Normal file
BIN
static/img/hardware/lora_v1_with_DS18B20.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.9 MiB |
Loading…
Reference in a new issue