archpi-zerow-sensors

command module
v0.0.0-...-96e195c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 14, 2020 License: MIT Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

archpi-zerow-sensors

ArchLinuxARM Raspberry PI Zero send sensors (DHT22, DS18B20) to influxdb v1.8 using go

2 programs: 1 for DHT22 and one for DS18B20

TODO:

  • try and learn some Go
  • merge both programs into 1 and share single influxdb client
  • use config file for all settings
  • make non-root user read DHT22 sensor

Tested on:

  • Linux archlinuxarm 5.4.83-1-ARCH #1 SMP PREEMPT Mon Dec 14 15:44:54 UTC 2020 armv6l GNU/Linux
  • go version go1.15.6 linux/arm
  • InfluxDB 1.8.3
  • /boot/config.txt:
gpu_mem=16
initramfs initramfs-linux.img followkernel

device_tree=bcm2835-rpi-zero-w.dtb

# does not work if below is enabled..
#dtoverlay=dht11,gpiopin=17

dtoverlay=w1-gpio,gpiopin=24

Connections:

- DS18B20 data line connected to GPIO24
- DHT22 data line connected to GPIO17

Compile:

- go build dht22.go
- go build ds18b20.go
  • go dependencies to be picked up in common manner

Thanks to all who provided libraries and examples online

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址