{"id":21028038,"url":"https://github.com/d2r2/go-sht3x","last_synced_at":"2025-05-15T10:33:07.436Z","repository":{"id":57506248,"uuid":"152933190","full_name":"d2r2/go-sht3x","owner":"d2r2","description":"Golang library to interact with Sensirion SHT3x relative humidity and temperature sensor's family via I2C-bus from Raspberry PI.","archived":false,"fork":false,"pushed_at":"2018-12-22T06:21:33.000Z","size":1433,"stargazers_count":7,"open_issues_count":2,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-03T08:02:50.654Z","etag":null,"topics":["embeded-linux","golang","gpio","i2c","i2c-sensors","raspberry-pi"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/d2r2.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-10-14T02:44:27.000Z","updated_at":"2025-04-01T09:24:08.000Z","dependencies_parsed_at":"2022-09-26T17:51:49.870Z","dependency_job_id":null,"html_url":"https://github.com/d2r2/go-sht3x","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d2r2%2Fgo-sht3x","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d2r2%2Fgo-sht3x/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d2r2%2Fgo-sht3x/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d2r2%2Fgo-sht3x/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/d2r2","download_url":"https://codeload.github.com/d2r2/go-sht3x/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254323234,"owners_count":22051744,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["embeded-linux","golang","gpio","i2c","i2c-sensors","raspberry-pi"],"created_at":"2024-11-19T11:53:40.510Z","updated_at":"2025-05-15T10:33:04.294Z","avatar_url":"https://github.com/d2r2.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"Sensirion SHT3x relative humidity and temperature sensor's family\n=================================================================\n\n[![Build Status](https://travis-ci.org/d2r2/go-sht3x.svg?branch=master)](https://travis-ci.org/d2r2/go-sht3x)\n[![Go Report Card](https://goreportcard.com/badge/github.com/d2r2/go-sht3x)](https://goreportcard.com/report/github.com/d2r2/go-sht3x)\n[![GoDoc](https://godoc.org/github.com/d2r2/go-sht3x?status.svg)](https://godoc.org/github.com/d2r2/go-sht3x)\n[![MIT License](http://img.shields.io/badge/License-MIT-yellow.svg)](./LICENSE)\n\nSHT30, SHT31, SHT35 ([general specification](https://raw.github.com/d2r2/go-sht3x/master/docs/Sensirion_Humidity_Sensors_SHT3x_Datasheet_digital.pdf), [alert mode specification](https://raw.github.com/d2r2/go-sht3x/master/docs/Sensirion_Humidity_Sensors_SHT3x_Application_Note_Alert_Mode_DIS.pdf)) high accuracy temperature and relative humidity sensor. Easily integrated with Arduino and Raspberry PI via i2c communication interface:\n![image](https://raw.github.com/d2r2/go-sht3x/master/docs/SHT3X.jpg)\n\nThis sensor has extra feature - integrated heater which could be helpfull in some specific application (such as periodic condensate removal, for example).\n\nHere is a library written in [Go programming language](https://golang.org/) for Raspberry PI and counterparts, which gives you in the output relative humidity and temperature values (making all necessary i2c-bus interracting and values computing).\n\nGolang usage\n------------\n\n\n```go\nfunc main() {\n\t// Create new connection to i2c-bus on 0 line with address 0x44.\n\t// Use i2cdetect utility to find device address over the i2c-bus\n\ti2c, err := i2c.NewI2C(0x44, 0)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer i2c.Close()\n\n\tsensor := sht3x.NewSHT3X()\n\n\ttemp, rh, err := sensor.ReadTemperatureAndRelativeHumidity(i2c, sht3x.REPEATABILITY_LOW)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tlog.Printf(\"Temperature and relative humidity = %v*C, %v%%\", temp, rh)\n```\n\n\nGetting help\n------------\n\nGoDoc [documentation](http://godoc.org/github.com/d2r2/go-sht3x)\n\nInstallation\n------------\n\n```bash\n$ go get -u github.com/d2r2/go-sht3x\n```\n\nTroubleshoting\n--------------\n\n- *How to obtain fresh Golang installation to RPi device (either any RPi clone):*\nIf your RaspberryPI golang installation taken by default from repository is outdated, you may consider\nto install actual golang mannualy from official Golang [site](https://golang.org/dl/). Download\ntar.gz file containing armv6l in the name. Follow installation instructions.\n\n- *How to enable I2C bus on RPi device:*\nIf you employ RaspberryPI, use raspi-config utility to activate i2c-bus on the OS level.\nGo to \"Interfaceing Options\" menu, to active I2C bus.\nProbably you will need to reboot to load i2c kernel module.\nFinally you should have device like /dev/i2c-1 present in the system.\n\n- *How to find I2C bus allocation and device address:*\nUse i2cdetect utility in format \"i2cdetect -y X\", where X may vary from 0 to 5 or more,\nto discover address occupied by peripheral device. To install utility you should run\n`apt install i2c-tools` on debian-kind system. `i2cdetect -y 1` sample output:\n\t```\n\t     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f\n\t00:          -- -- -- -- -- -- -- -- -- -- -- -- --\n\t10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --\n\t20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --\n\t30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --\n\t40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --\n\t50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --\n\t60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --\n\t70: -- -- -- -- -- -- 76 --    \n\t```\n\nContact\n-------\n\nPlease use [Github issue tracker](https://github.com/d2r2/go-sht3x/issues) for filing bugs or feature requests.\n\n\nLicense\n-------\n\nGo-sht3x is licensed under MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd2r2%2Fgo-sht3x","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fd2r2%2Fgo-sht3x","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd2r2%2Fgo-sht3x/lists"}