Categorygithub.com/shanghuiyang/rpi-devices
repository
0.0.0-20240813145034-5a00c065ccd9
Repository: https://github.com/shanghuiyang/rpi-devices.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author

# README

rpi-devices

ci License GoDoc

rpi-devices implements drivers for various kinds of sensors or devices based on raspberry pi in pure Golang.

Usage

package main

import (
	"time"

	"github.com/shanghuiyang/rpi-devices/dev"
)

const pin = 26

func main() {
	led := dev.NewLedImp(pin)
	for {
		led.On()
		time.Sleep(1 * time.Second)
		led.Off()
		time.Sleep(1 * time.Second)
	}
}

Currently Implemented Drivers

SensorsImageDescriptionExampleProjects
ADS1015Analog-to-digital converterN/Ajoystick
ButtonButton moduleexamplevedio-monitor
BuzzerBuzzer moduleN/Acar, door-dog
BYJ2848Step motorexampleN/A
Collision SwitchA switch for deteching collisionexamplecar
DHT11Temperature & Humidity sensorexamplehome-asst
Display Digital Led TM1637Digital led moduleexampleauto-air
Display LCDLCD display moduleexamplehome-asst
Display SSD1360Oled display moduleexamplehome-asst
Display ST7899TFT LCD display moduleexamplegps-tracker
DS18B20Temperature sensorexampleauto-fan
EncoderEncoder sensorexampleN/A
GPS NEO-6MLocation sensorexamplecar
GPS HT1818Location sensorN/Agps-tracker
GY-25Angle sensorexamplecar
HC-SR04Ultrasonic distance meterexampleauto-light, doordog
HDC1080Thermohygrometer sensorexamplehome-asst
Humidity DetectorSoil humidity detectorexampleN/A
Infrared Encoder/DecoderInfrared encoder/decoderexampleN/A
InfraredInfrared sensorexampleN/A
JoystickXY Dual Axis Joystickexamplecar
L298NMotor driverN/Acar
LC12S2.4g wireless moduleexamplecar
LedLed lightexamplecar, vedio-monitor
MPU60506-axis motion sensorexampleN/A
PCF8591Analog-to-digital converterN/AN/A
PMS7003Air quality sensorexampleauto-air
RelayRelay moduleexampleauto-fan
RX480E-4433MHz Wireless RF Receiverexampleremote-light
SG90Servo motorexampleauto-air, car, vedio-monitor
SW-420Shaking sensorexampleauto-air-out
US-100Ultrasonic distance meterexamplecar
Voice DetectorVoice detectorN/AN/A
Water Flow SensorWater flow sensorexampleN/A
ZE08-CH2OCH2O sensorexamplech2o-monitor
ZP16Gas detectorexamplehome-asst

Projects

See my another repo rpi-projects for all projects that I developed them using this libaray.